[FFmpeg-devel] [PATCH]lavc/pnmdec: Do not fail by default for truncated pbm files

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Sep 5 11:22:20 EEST 2016


2016-09-05 9:21 GMT+02:00 Michael Niedermayer <michael at niedermayer.cc>:
> On Sun, Sep 04, 2016 at 08:58:44PM +0200, Carl Eugen Hoyos wrote:

>> @@ -159,6 +163,8 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
>>              }
>>          }else{
>>          for (i = 0; i < avctx->height; i++) {
>> +            if (s->bytestream + n > s->bytestream_end)
>> +                continue;
>
> having a pointer point outside of 0..array length is undefined
> behaviour (and can overflow in principle)


New patch attached.

Thank you, Carl Eugen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavc-pnmdec-Do-not-abort-by-default-for-truncated-pb.patch
Type: text/x-patch
Size: 1562 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160905/ab31ce18/attachment.bin>


More information about the ffmpeg-devel mailing list