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

Michael Niedermayer michael at niedermayer.cc
Sun Nov 20 00:30:09 EET 2016


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

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

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161119/d47ac6b8/attachment.sig>


More information about the ffmpeg-devel mailing list