Commit 1bb05797 authored by Michael Niedermayer's avatar Michael Niedermayer

sanm: remove "duplicate" for loop.

Fixes input buffer overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 49b729d3
......@@ -652,8 +652,7 @@ static int old_codec47(SANMVideoContext *ctx, int top,
if (bytestream2_get_bytes_left(&ctx->gb) < width * height)
return AVERROR_INVALIDDATA;
for (j = 0; j < height; j++) {
for (i = 0; i < width; i++)
bytestream2_get_bufferu(&ctx->gb, dst, width);
bytestream2_get_bufferu(&ctx->gb, dst, width);
dst += stride;
}
break;
......
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