[FFmpeg-devel] [PATCH 2/3] avpacket: Removing a memset that could cause double free
Vignesh Venkatasubramanian
vigneshv at google.com
Fri Aug 30 20:29:33 CEST 2013
On Fri, Aug 30, 2013 at 11:26 AM, Vignesh Venkatasubramanian
<vigneshv at google.com> wrote:
> Removing a memset from copy_side_data which could potentially cause
> double free.
>
> Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
> ---
> libavcodec/avpacket.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
> index 7196c31..ac761f1 100644
> --- a/libavcodec/avpacket.c
> +++ b/libavcodec/avpacket.c
> @@ -225,8 +225,6 @@ int av_copy_packet_side_data(AVPacket *pkt, AVPacket *src)
> int i;
> DUP_DATA(pkt->side_data, src->side_data,
> src->side_data_elems * sizeof(*src->side_data), 0, ALLOC_MALLOC);
> - memset(pkt->side_data, 0,
> - src->side_data_elems * sizeof(*src->side_data));
> for (i = 0; i < src->side_data_elems; i++) {
> DUP_DATA(pkt->side_data[i].data, src->side_data[i].data,
> src->side_data[i].size, 1, ALLOC_MALLOC);
> --
> 1.8.4
>
I think git send-email named the subjects as 2/3 and 3/3 because of the patch
file names being that way. But there are only two patches in this set.
Also, please
note that all 4 patches (related to muxer/encoder) should be applied together.
So please wait until all of them are reviewed and approved.
Thanks.
More information about the ffmpeg-devel
mailing list