After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 391671 - Metadata parse failure due to recursive IFD pointers.
Metadata parse failure due to recursive IFD pointers.
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Import
0.3.x
Other Linux
: Normal blocker
: 0.7.1
Assigned To: F-spot maintainers
F-spot maintainers
Depends on: f-spot-taglib
Blocks:
 
 
Reported: 2007-01-01 22:29 UTC by Steve Brown
Modified: 2010-07-13 18:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Minimal testcase (11.44 KB, image/jpeg)
2008-04-22 17:44 UTC, Tim Retout
  Details
Throw exception on recursion (4.36 KB, patch)
2009-01-06 05:36 UTC, Steve Brown
needs-work Details | Review

Description Steve Brown 2007-01-01 22:29:15 UTC
Attached testcase crashes f-spot when trying to import this photo.  This is 0.3.0-2 on Fedora Rawhide.  Ping me back if you'd like a full trace, CVS, whatever.  Thanks.
Comment 1 Steve Brown 2007-01-01 22:35:27 UTC
Original photo (1.3 MiB) uploaded at:
http://putstuff.putfile.com/32423/2658356

This is a worthless picture of a guy getting into a car.  Note that putfile.com has lots of stupid ads to click-through, sorry about this.
Comment 2 Stephane Delcroix 2007-01-02 14:00:47 UTC
confirmed
Comment 3 Stephane Delcroix 2007-01-17 16:25:04 UTC
The issue is in the picture, but this shouldn't be critical. The exif part is corrupt (Maximum directory nesting exceeded).

If you remove the exif part of the image (e.g. using "jhead -purejpg crasher.jpeg"), you then can import it.

Do you have that kind of issue only with this image (in this case, we can say that the file was bad) or on a complete set ?
Comment 4 Steve Brown 2007-01-17 21:48:38 UTC
This was the only image out of a batch of >8000.  Even if the image is unbelievably corrupt, it still shouldn't crash the program IMHO.  Is this another libexif bug?

On a (possibly) unrelated note, importing photos past this one triggers bug #397775.
Comment 5 Larry Ewing 2007-01-17 22:11:03 UTC
Just from reading the description this sounds like a libexif bug.  The error string Stephane mentions indicates that part of the tiff structure has a self referencial loop.  The internal f-spot code tries to deal with that case, I suspect libexif doesn't and the stack is being blown.  I'll look into it more deeply soon.
Comment 6 Stephane Delcroix 2007-01-18 07:16:37 UTC
requalified as Normal, since it only affects one picture
Comment 7 Michele Baldessari 2007-06-25 14:20:19 UTC
Hi folks, the picture at the mentioned links doesn't exist anymore. Does anyone still have it around?
Comment 8 Steve Brown 2007-06-25 21:19:12 UTC
Re-uploaded at http://www.et.byu.edu/~shb34/software/crasher.jpg . Thanks again!
Comment 9 Tim Retout 2008-04-22 17:44:22 UTC
Created attachment 109708 [details]
Minimal testcase

Resized to a single pixel. Attaching to the bug so that it doesn't get lost.
Comment 10 Steve Brown 2008-11-11 21:56:34 UTC
bump
Comment 11 Steve Brown 2009-01-06 05:36:23 UTC
Created attachment 125825 [details] [review]
Throw exception on recursion

This image has a corrupt exif structure such that the IFDs point in a loop:
Exif -> IFD 0 -> Interop -> Exif ... etc.
This indirect path does not trigger F-Spot's recursion detection code.

Here is a patch.  I am a novice and it is very inelegant.  (Specifically, I changed a whole bunch of class constructors.)  Can someone find a simpler way to fix this?

I also (mistakenly) cross-posted this at
http://sourceforge.net/tracker/index.php?func=detail&aid=2482865&group_id=12272&atid=112272
Comment 12 Ruben Vermeersch 2010-06-11 07:41:05 UTC
Interesting corruption. We should get this into the Taglib# regression suite.
Comment 13 Ruben Vermeersch 2010-06-24 14:49:13 UTC
Comment on attachment 125825 [details] [review]
Throw exception on recursion

Maintenance update: In the past we've been less than stellar in reviewing patches. As such we have a pile of patches in bugzilla which are outdated and don't apply anymore. Am currently marking all of these as "needs-work". My apologies for this.

Since I've become a maintainer of the project, I've set the personal rule of quickly reviewing all patches, to avoid that this happens again. If you (or anyone) wants to go through the trouble of updating this patch, please talk to us to figure out if it fits in the F-Spot long term roadmap.

Should you, in the future, notice a patch lingering around for too long, please notify us immediately and we'll look into it, to avoid situations like these from happening again.

You can filter these mails by searching for ###F-OLDPATCHCLEANUP###
Comment 14 Ruben Vermeersch 2010-07-13 18:33:29 UTC
Added cycle-detection support to Taglib#, so this should work fine starting with F-Spot 0.7.1.