gavinljj / mp4v2

Automatically exported from code.google.com/p/mp4v2
Other
0 stars 0 forks source link

Tags::fetchInteger crashes for certain files #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./configure && make
2. ./mp4info file.m4a
3. Segmentation fault: 11

What is the expected output? What do you see instead?

I expect to see information on the file, but I get

Track   Type    Info
1   audio   MPEG-4 AAC LC, 27.353 secs, 256 kbps, 44100 Hz
Segmentation fault: 11

I've tracked down the problem to line 494 of Tags.cpp. The program crashes 
because data.value is NULL and it is being dereferenced.  I have not gone 
backwards in the file parsing process to see how the compilation tag is 
inserted into the CodeItemMap with NULL value, but it seems that even if the 
file is malformed the library shouldn't segfault. 

What version of the product are you using? On what operating system?

The latest svn on Mac OS X 10.7.2

Please provide any additional information below.

I've attached a file illustrating the problem. I've also submitted a patch 
which fixes the issue.

Original issue reported on code.google.com by stephen....@gmail.com on 15 Oct 2011 at 8:10

Attachments:

GoogleCodeExporter commented 9 years ago
Looking into it now...thanks for the report.

Original comment by kid...@gmail.com on 18 Oct 2011 at 11:40

GoogleCodeExporter commented 9 years ago

Original comment by kid...@gmail.com on 18 Oct 2011 at 11:40

GoogleCodeExporter commented 9 years ago
I tried to find root cause, but I'm not sure.  It's possible the mp4 file is 
somehow invalid, but I believe you're correct: the library should not fault for 
something like this, particularly when it's avoidable.  Thanks for the fix, 
should be in r487.

Original comment by kid...@gmail.com on 19 Oct 2011 at 6:05