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,7 +652,6 @@ static int old_codec47(SANMVideoContext *ctx, int top, ...@@ -652,7 +652,6 @@ static int old_codec47(SANMVideoContext *ctx, int top,
if (bytestream2_get_bytes_left(&ctx->gb) < width * height) if (bytestream2_get_bytes_left(&ctx->gb) < width * height)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
for (j = 0; j < height; j++) { 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; dst += 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