rawdec: fix mjpeg probing buffer size check
authorwm4 <nfxjfg@googlemail.com>
Wed, 29 Jul 2015 20:33:44 +0000 (22:33 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 29 Jul 2015 22:06:15 +0000 (00:06 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/rawdec.c

index caa209f..7684e1d 100644 (file)
@@ -191,7 +191,7 @@ static int mjpeg_probe(AVProbeData *p)
         static const char ct_jpeg[] = "\r\nContent-Type: image/jpeg\r\n";
         int i;
 
-        for (i=0; i<FFMIN(p->buf_size - sizeof(ct_jpeg), 100); i++)
+        for (i=0; i<FFMIN(p->buf_size - (int)sizeof(ct_jpeg), 100); i++)
             if (!memcmp(p->buf + i, ct_jpeg, sizeof(ct_jpeg) - 1))
                 return AVPROBE_SCORE_EXTENSION;