libexif produces corrupt EXIF data on panasonic images.
This bug was encountered in GIMP, but seems to be an libexif issue (see https://bugzilla.gnome.org/show_bug.cgi?id=688103\)
Steps to reproduce:
# exif -d --remove-thumbnail original.jpg -o corrupt.jpg
# exiftool original.jpg | grep "Lens Type"
Lens Type : LUMIX G VARIO PZ 14-42/F3.5-5.6
# exiftool corrupt.jpg | grep "Lens Type"
Lens Type : :99:99 00:00:00
# exiv2 corrupt.jpg
Error: Upper boundary of data for directory Panasonic, entry 0x0067 is out of bounds: Offset = 0x00002350, size = 64, exceeds buffer size by 56 Bytes; truncating the entry
Error: Offset of directory Panasonic, entry 0x2003 is out of bounds: Offset = 0x00002390; truncating the entry
Error: Offset of directory Panasonic, entry 0x8010 is out of bounds: Offset = 0x000023a4; truncating the entry
See attached file "original.jpg" to reproduce the error. This is a resized
image, the originals produced by my Panasonic DMC-GX1 camera all have the same