Browse code

avutil/pixdesc: Prevent minor array overread in ff_check_pixfmt_descriptors()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2013/09/14 03:51:04
Showing 1 changed files
... ...
@@ -1987,7 +1987,7 @@ void ff_check_pixfmt_descriptors(void){
1987 1987
                 av_assert0(8*(c->step_minus1+1) >= c->depth_minus1+1);
1988 1988
             }
1989 1989
             av_read_image_line(tmp, (void*)data, linesize, d, 0, 0, j, 2, 0);
1990
-            if (!memcmp(d->name, "bayer_", 6))
1990
+            if (!strncmp(d->name, "bayer_", 6))
1991 1991
                 continue;
1992 1992
             av_assert0(tmp[0] == 0 && tmp[1] == 0);
1993 1993
             tmp[0] = tmp[1] = (1<<(c->depth_minus1 + 1)) - 1;