[FFmpeg-cvslog] rawdec: fix mjpeg probing buffer size check

wm4 git at videolan.org
Thu Jul 30 19:37:59 CEST 2015


ffmpeg | branch: release/2.5 | wm4 <nfxjfg at googlemail.com> | Wed Jul 29 22:33:44 2015 +0200| [1eb646ec9f87ed488f52561867e107eaee89e20c] | committer: Michael Niedermayer

rawdec: fix mjpeg probing buffer size check

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 4c6beaed9210f01290e5a5a4e377f93f145172cc)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1eb646ec9f87ed488f52561867e107eaee89e20c
---

 libavformat/rawdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index 6a9085a..d8dc1c3 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -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;
 



More information about the ffmpeg-cvslog mailing list