[FFmpeg-devel] [PATCH] icodec: correctly check avio_read return value
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Thu Nov 10 23:06:12 EET 2016
On 10.11.2016 21:14, Michael Niedermayer wrote:
> On Wed, Nov 09, 2016 at 08:56:00PM +0100, Andreas Cadhalpun wrote:
>> icodec.c | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>> 04c12ac83fea7b911f4050c547b77d1c48e9228b 0001-icodec-correctly-check-avio_read-return-value.patch
>> From 31f78a6d2906de4ee69e472aced5fef3af709b9a Mon Sep 17 00:00:00 2001
>> From: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
>> Date: Tue, 8 Nov 2016 23:29:28 +0100
>> Subject: [PATCH] icodec: correctly check avio_read return value
>>
>> It can read less than the requested amount, in which case buf contains
>> uninitialized data, causing problems like segmentation faults later on.
>>
>> Also make sure that image->size is positive, so that it can't match a
>> negative error code.
>>
>> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
>> ---
>> libavformat/icodec.c | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavformat/icodec.c b/libavformat/icodec.c
>> index 8019a35..c273bf6 100644
>> --- a/libavformat/icodec.c
>> +++ b/libavformat/icodec.c
>
> should be ok
Pushed.
Best regards,
Andreas
More information about the ffmpeg-devel
mailing list