[FFmpeg-devel] [PATCH] libavformat: Segfault on Apple HTTP Livestream playlist with unavailable hosts

Michael Niedermayer michaelni at gmx.at
Wed Dec 14 17:50:14 CET 2011


On Wed, Dec 14, 2011 at 05:32:35PM +0100, Nicolas George wrote:
> Le quartidi 24 frimaire, an CCXX, Takis Issaris a écrit :
> > The attached patch checks the AVFormatContext->iformat pointer before
> > dereferencing it.
>
> That seems wrong: there are a lot of places that dereference iformat
> unconditionally, thus it seems that it being not null is implicitly part of
> the API.
>
> According to your ticket :
>
> > the code jumps to fail, which invokes free_variant_list() which in turn
> > invokes avformat_close_input()
>
> I believe free_variant_list is wrong to call avformat_close_input on format
> contexts that have not been properly opened.

hmm, seems i commited that before there was a consensus ...
to me it looks convenient to just be able to call close/free without
needing to protect each call with checks. That is rather have the
checks inside the free/close function

[...]

--
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111214/21abae5d/attachment.asc>


More information about the ffmpeg-devel mailing list