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

wm4 nfxjfg at googlemail.com
Thu Jul 30 00:28:36 CEST 2015


On Thu, 30 Jul 2015 00:17:49 +0200
Michael Niedermayer <michael at niedermayer.cc> wrote:

> On Wed, Jul 29, 2015 at 10:33:44PM +0200, wm4 wrote:
> > ---
> > If I read this right, the subtraction and comparison would be done in
> > unsigned, because size_t is unsigned. Which would make this check
> > ineffective. (p->buf_size is int.)
> > ---
> >  libavformat/rawdec.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> i wonder why this wasnt noticed before
> ive the suspicioun the negative case cannot actually occur
> either way its a bug

When not? I suppose normally nobody would make the probe buffer so
small, but what about small files?


More information about the ffmpeg-devel mailing list