[FFmpeg-devel] [PATCH]Avoid overflows when reading pgm with maxval != 255 and 65535

Carl Eugen Hoyos cehoyos at ag.or.at
Sun Jul 28 23:08:22 CEST 2013


Michael Niedermayer <michaelni <at> gmx.at> writes:

> > > +    int maskval;
> > 
> > maskval removed from context, "unsigned int 
> > maskval = 0" added and all occurrences of 
> > s->maskval replaced by maskval locally.

The patch is quite broken, but decoding of affected 
samples didn't work before either (on le).

> btw, you probably should report this issue to the 
> devels responsible for the software generating 
> such files

Fixed in libjpeg cvs, not released yet (probably 
because of the very short time that passed since 
the fix):
http://libjpeg.cvs.sourceforge.net/viewvc/libjpeg/libjpeg/wrppm.c?r1=1.1&r2=1.2

Carl Eugen



More information about the ffmpeg-devel mailing list