summaryrefslogtreecommitdiff
path: root/libavcodec/sanm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-22 22:28:41 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-22 22:29:23 +0100
commit1bb05797ec27a0a2b921c18466f898b23c4a9740 (patch)
treee166edfcae127d227d83766c52482fbb5c390856 /libavcodec/sanm.c
parent49b729d3af8464de431362e6c5b3027102bc2f88 (diff)
downloadffmpeg-1bb05797ec27a0a2b921c18466f898b23c4a9740.tar.gz
sanm: remove "duplicate" for loop.
Fixes input buffer overread Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/sanm.c')
-rw-r--r--libavcodec/sanm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
index ff70f206e6..db22fc99ef 100644
--- a/libavcodec/sanm.c
+++ b/libavcodec/sanm.c
@@ -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;