[FFmpeg-devel] [PATCH 2/3] avpacket: Removing a memset that could cause double free

Vignesh Venkatasubramanian vigneshv at google.com
Mon Sep 2 19:48:18 CEST 2013


On Fri, Aug 30, 2013 at 6:57 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sat, Aug 31, 2013 at 03:54:31AM +0200, Michael Niedermayer wrote:
>> On Fri, Aug 30, 2013 at 03:28:45PM -0700, Vignesh Venkatasubramanian wrote:
>> > On Fri, Aug 30, 2013 at 12:49 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > >
>> > > On Fri, Aug 30, 2013 at 11:26:52AM -0700, Vignesh Venkatasubramanian wrote:
>> > > > Removing a memset from copy_side_data which could potentially cause
>> > > > double free.
>> > >
>> > > this is a misunderstanding, this patch causes the problems, it does
>> > > not fix them
>> > > you can just force a error path and remove the memset to see this
>> > > in make fate
>> > > (needs latest git head as there where other bugs when the error paths
>> > >  where used that i just fixed)
>> >
>> > ok, any idea as to how i can fix this to get it working to do what i want
>> > with the side data copying?
>>
>> if i undestand the issue correctly puting the memset under
>> if(src != dst) might work
>
> but make sure that the error cases work without leaks and double
> frees

yes, it worked and i verified that there are no issues with the error cases
as well.

i tried replying the new patch to this thread, but git send-email decided
to create a new thread (probably because i changed the commit message).
we shall abandon this thread. could you please review the new patch.

thanks.

>
> [...]
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Asymptotically faster algorithms should always be preferred if you have
> asymptotical amounts of data
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list