You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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>
This commit is contained in:
@@ -168,7 +168,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (y = 0; y < h; y++) {
|
for (y = 0; y < h; y++) {
|
||||||
if (buf_end - buf < len)
|
if (buf_end - buf < alen)
|
||||||
break;
|
break;
|
||||||
memcpy(ptr, buf, len);
|
memcpy(ptr, buf, len);
|
||||||
ptr += stride;
|
ptr += stride;
|
||||||
|
Reference in New Issue
Block a user