exr: fix out of bounds read in get_code
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sun, 13 Dec 2015 22:17:09 +0000 (23:17 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sun, 20 Dec 2015 13:17:47 +0000 (14:17 +0100)
commit5b88d24f241f1ae31d86d2987b17a1db7547a509
tree1d70ae2fc32deb346ee62dd86b4688b50a75dfb5
parent3e187a9a2dfacea0d76df90dd88d957938f9d33c
exr: fix out of bounds read in get_code

This macro unconditionally used out[-1], which causes an out of bounds
read, if out is the very beginning of the buffer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 90b99a81071d10e6b5efe86a4602d54d4f45bbcb)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/exr.c