[FFmpeg-devel] [PATCH] libavformat/utils: Fix segfault on m4a cover artwork parsing

Michael Niedermayer michaelni at gmx.at
Wed May 28 19:28:29 CEST 2014


On Wed, May 28, 2014 at 05:35:10PM +0300, Lazaros Koromilas wrote:
> On Wed, May 28, 2014 at 03:48:25AM +0200, Michael Niedermayer wrote:
> > On Tue, May 27, 2014 at 02:38:44PM +0300, Lazaros Koromilas wrote:
> > > Hello list,
> > > 
> > > I came across this bug when my MPD choked on some iTunes files while updating
> > > its database.  Turns out that I had a few m4a files with zero-length cover
> > > artwork tags that triggered this.  I've uploaded to the ftp server a sample
> > > created from scratch with ffmpeg and TagLib under the name
> > > segfault_avformat_cover_art.{m4a,txt}.  The diff at the end avoids the crash,
> > > but I don't know if the return code is appropriate.  Maybe you want to simply
> > > ignore those cases?  Including valgring output also.  I'm not on the list,
> > > so please reply in person for anything else.
> > 
> > patch applied
> > 
> > thanks
> > 
> > [...]
> 
> Hello again, I wasn't happy with the fix and did a little more
> testing.  This diff lets you extract other streams if needed.  For
> example in my case I can obtain a clean file with:
> 
> ffmpeg -i segfault_avformat_cover_art.m4a -acodec copy -map 0:0 out.m4a

applied

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140528/f9d6feef/attachment.asc>


More information about the ffmpeg-devel mailing list