I tested more on Hardy with your gthumb version. Funny enough I could not reproduce with your jpeg, but when I converted your pnm to a jpeg, gthumb crashed with this new jpeg. I could see from your gdb log what could go wrong, but I needed to make an unoptimized build to verify it.
BTW, it is known that this old imagemagick version does bad things to the exif tags, see for instance bug 178575.
I tested more on Hardy with your gthumb version. Funny enough I could not reproduce with your jpeg, but when I converted your pnm to a jpeg, gthumb crashed with this new jpeg. I could see from your gdb log what could go wrong, but I needed to make an unoptimized build to verify it.
BTW, it is known that this old imagemagick version does bad things to the exif tags, see for instance bug 178575.