diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-01 19:24:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-02 12:06:22 +0100 |
commit | 37138338ff602803d174b13fecd363a083bc2f9a (patch) | |
tree | ce9fb28df479d8591d76a65850ea3986dd7ffb96 /libavcodec/sunrast.c | |
parent | d401c37ef5036a12c03d4cbdbbde561d9a7ba4b3 (diff) | |
download | ffmpeg-37138338ff602803d174b13fecd363a083bc2f9a.tar.gz |
avcodec/sunrast: Fix input buffer pointer check
Fixes: out of array read
Fixes: poc.dat
Found-by: Bingchang, Liu @VARAS of IIE
Tested-by: bc L <l.bing.chang.bc@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/sunrast.c')
-rw-r--r-- | libavcodec/sunrast.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c index 25e11f6cd2..0af5626e35 100644 --- a/libavcodec/sunrast.c +++ b/libavcodec/sunrast.c @@ -168,7 +168,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data, } } else { for (y = 0; y < h; y++) { - if (buf_end - buf < len) + if (buf_end - buf < alen) break; memcpy(ptr, buf, len); ptr += stride; |