Bug 345169 - Incorrect method of parsing metadata from MP4 files (leads to hangs with current libexiv2)
Summary: Incorrect method of parsing metadata from MP4 files (leads to hangs with curr...
Status: RESOLVED UPSTREAM
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: Other (add details in bug description)
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-15 08:28 UTC by Vitaliy Filippov
Modified: 2017-09-08 18:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaliy Filippov 2015-03-15 08:28:40 UTC
Hi!
I'm using gwenview 4.14.0 pre (from debian unstable).
I've discovered it uses exiv2::MemIO on the first 64Kbytes of video files (including MP4) to parse metadata.
But, this method is incorrect - MP4 may have metadata in any position! In fact, the default layout for MP4 is with metadata IN THE END! So it can't be parsed from the first 64Kbytes.
Moreover, it leads to HANGS on current versions of exiv2 - it wasn't expecting truncated files and basically performed an infinite loop on them.
Specifically, I had to patch libexiv2 and send the patch upstream (http://dev.exiv2.org/issues/1038) to make Gwenview read a folder with video files from my mobile phone.
And the bug also happens on truncated AVI files...
Of course libexiv2 shouldn't crash or hang regardless of the input file validity... but Gwenview's method of parsing metadata is still incorrect.

Reproducible: Always
Comment 1 jack_sprat 2016-08-19 10:17:52 UTC
I can confirm this bug: Gwenview4.14.3-4.3.i586 under OpenSuse 13.2 i586

Gwenview hangs if folder contains either MP4 or AVI files, but is fine with MOV (and JPG)
Comment 2 Nate Graham 2017-09-08 18:57:02 UTC
I've seen quite a lot of bugs related to bad versions of libexiv2. They've all been resolved with newer versions of that library. Can you confirm?