Commit 37138338 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/sunrast: Fix input buffer pointer check

Fixes: out of array read
Fixes: poc.dat

Found-by: Bingchang, Liu @VARAS of IIE
Tested-by: 's avatarbc L <l.bing.chang.bc@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent d401c37e
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment