summaryrefslogtreecommitdiff
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-27 21:52:24 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-27 23:47:23 +0100
commit8888c72fcfe1419668cc41dca4399374e6c09680 (patch)
tree63a8a3b7ced8d5d3410292d9e1adbf42a13a0efc /libavcodec/mjpegdec.c
parentd88d0b6db6bd77269e3c2d3b4894c072f3860671 (diff)
mjpegdec: fix memcmp size for *_count
Fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 3042eb3399..fc428df241 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -303,8 +303,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
/* if different size, realloc/alloc picture */
if ( width != s->width || height != s->height
- || memcmp(s->h_count, h_count, sizeof(h_count[0])*nb_components)
- || memcmp(s->v_count, v_count, sizeof(v_count[0])*nb_components)) {
+ || memcmp(s->h_count, h_count, sizeof(h_count))
+ || memcmp(s->v_count, v_count, sizeof(v_count))) {
av_freep(&s->qscale_table);
s->width = width;