[FFmpeg-devel] [PATCH] avcodec/avpacket: fix leak on realloc in av_packet_add_side_data()

James Almer jamrial at gmail.com
Sun Nov 20 01:30:11 EET 2016


On 11/19/2016 7:30 PM, Michael Niedermayer wrote:
> On Sat, Nov 19, 2016 at 01:10:27PM -0300, James Almer wrote:
>> If realloc fails, the pointer is overwritten and the previously allocated buffer
>> is leaked, which goes against the expected functionality of keeping the packet
>> unchanged in case of error.
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> Should i backport this to affected branches?
>>
>>  libavcodec/avpacket.c | 7 ++++---
>>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> LGTM
> 
> thx

Pushed and backported to releases 3.0, 3.1 and 3.2.

Thanks.



More information about the ffmpeg-devel mailing list