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 15:13:32 +0000 (16:13 +0100)
commite7b09eaefa5d117c79e23d7c70732249af383b2a
tree69382aeb6b608d6bcc3f78ace504e972d0783f28
parente32095807b86480dfa5395972f7734990e27c146
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