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

Michael Niedermayer michaelni at gmx.at
Sun Jul 28 19:04:30 CEST 2013


On Sun, Jul 28, 2013 at 04:23:33PM +0000, Carl Eugen Hoyos wrote:
> Carl Eugen Hoyos <cehoyos <at> ag.or.at> writes:
> 
> > +++ b/libavcodec/pnm.h
> >  <at>  <at>  -30,6 +30,7  <at>  <at>  typedef struct PNMContext {
> >      uint8_t *bytestream_end;
> >      AVFrame picture;
> >      int maxval;                 ///< maximum value of a pixel
> > +    int maskval;
> 
> maskval removed from context, "unsigned int maskval = 0" added 
> and all occurrences of s->maskval replaced by maskval locally.

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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130728/b49865c6/attachment.asc>


More information about the ffmpeg-devel mailing list