]> git.sesse.net Git - ffmpeg/commitdiff
vp9/parser: change size type to unsigned.
authorRonald S. Bultje <rsbultje@gmail.com>
Sat, 8 Feb 2014 11:50:43 +0000 (06:50 -0500)
committerClément Bœsch <u@pkh.me>
Sat, 8 Feb 2014 11:53:59 +0000 (12:53 +0100)
Fixes valgrind errors in fuzzed8.ivf because size >= 0x80000000.

libavcodec/vp9_parser.c

index 2de8937532a8584d19704240f00a57890f127b45..af033c25e64639c7171213fcfd9cc38eaefd5439 100644 (file)
@@ -73,12 +73,12 @@ static int parse(AVCodecParserContext *ctx,
 #define case_n(a, rd) \
             case a: \
                 while (n_frames--) { \
-                    int sz = rd; \
+                    unsigned sz = rd; \
                     idx += a; \
                     if (sz > size) { \
                         s->n_frames = 0; \
                         av_log(avctx, AV_LOG_ERROR, \
-                               "Superframe packet size too big: %d > %d\n", \
+                               "Superframe packet size too big: %u > %d\n", \
                                sz, size); \
                         return size; \
                     } \