New issue 125 by stephen....@gmail.com: Malformed files cause segmentation
faults
http://code.google.com/p/mp4v2/issues/detail?id=125
What steps will reproduce the problem?
1. Run mp4info on the attached file
What is the expected output? What do you see instead?
I expect to see some information on the file, but instead it crashes:
/Volumes/Home/sbooth/Downloads/04 BBB.m4a:
ReadChildAtoms: "/Volumes/Home/sbooth/Downloads/04 BBB.m4a": In atom ?lyr
missing child atom data
Track Type Info
1 audio MPEG-4 AAC LC, 211.417 secs, 128 kbps, 44100 Hz
ReadChildAtoms: "/Volumes/Home/sbooth/Downloads/04 BBB.m4a": In atom ?lyr
missing child atom data
Segmentation fault: 11
What version of the product are you using? On what operating system?
The latest svn version
Please provide any additional information below.
I've attached a patch which fixes the problem.
There is a comment in MP4ItmfItem_s that says that dataList.size is always
>=1 (itmf_generic.h:126) but in __itemAtomToModel (generic.cpp:154) if
there are no data atoms the size is left at 0 (line 188). This means that
all the fetchXXX functions in Tag.cpp will segfault when
f->second->dataList.elements[0] is called. The patch remedies the issue by
verifying that dataList.size is at least 1 and returns if it isn't. I
don't know if this is strictly the desired behavior, as the comment
indicates that size should always be at least one, but in my testing I
didn't notice any side effects.
Attachments:
04 BBB.m4a 3.3 MB
Tags.cpp.patch 2.2 KB
Is someone available to look at this issue and commit the fix?
Stephen,
Sorry, thanks for the reminder. I'll have a look today hopefully;
definitely this week.
Comment #3 on issue 125 by kid...@gmail.com: Malformed files cause
segmentation faults
http://code.google.com/p/mp4v2/issues/detail?id=125
This should be fixed in r490. Quick question: do you know if you can read
the lyric tag with any other applications out there? Or is this file
somehow invalid?
I think you're correct--the app shouldn't segfault on the file--but I'm
wondering if there's some improvement to be made to read this file in full,
or if it's just bogus at some basic level. Thanks for the report.