On Fri, Nov 20, 2015 at 3:00 PM, Michael Niedermayer <michae...@gmx.at> wrote: > On Sun, Nov 15, 2015 at 07:21:11PM -0500, Ganesh Ajjanagadde wrote: >> Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and >> 3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning >> up usage of the formats API, and in particular fixed possible NULL pointer >> dereferences. >> >> This commit addresses the issue of possible resource leaks when one call >> fails and the others don't. >> >> Fixes: CID 1338330, 1338329, 1338327, 1338326. >> >> Signed-off-by: Ganesh Ajjanagadde <gajjanaga...@gmail.com> >> --- >> libavfilter/af_channelmap.c | 7 +++++-- >> libavfilter/vf_alphamerge.c | 7 +++++-- >> libavfilter/vf_overlay.c | 30 +++++++++++++++++++++--------- >> 3 files changed, 31 insertions(+), 13 deletions(-) > > if the error pathes have been tested with valgrind or assan (and > simulating/forcing them to trigger) then this should be ok
Unfortunately, I have no idea how to test such code pathways easily. - how does one force a particular malloc to fail? Isn't the cheapest solution simply to submit a Coverity build for this and check? > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Many that live deserve death. And some that die deserve life. Can you give > it to them? Then do not be too eager to deal out death in judgement. For > even the very wise cannot see all ends. -- Gandalf > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel