Browse Source

rawdec: fix mjpeg probing buffer size check

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8
wm4 Michael Niedermayer 10 years ago
parent
commit
4c6beaed92
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/rawdec.c

+ 1
- 1
libavformat/rawdec.c View File

@@ -191,7 +191,7 @@ static int mjpeg_probe(AVProbeData *p)
static const char ct_jpeg[] = "\r\nContent-Type: image/jpeg\r\n"; static const char ct_jpeg[] = "\r\nContent-Type: image/jpeg\r\n";
int i; 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)) if (!memcmp(p->buf + i, ct_jpeg, sizeof(ct_jpeg) - 1))
return AVPROBE_SCORE_EXTENSION; return AVPROBE_SCORE_EXTENSION;




Loading…
Cancel
Save