jpegview
jpegview copied to clipboard
Fix off-by-one errors in EXIFReader early-out guards
Hi @sylikc and contributors, and thanks for your excellent work maintaining jpegview!
I assume that these pointer checks are designed as a guard to abort the EXIFReader in case of malformed EXIF data. They are, however, too strict. The “equal” case is fine, no header regions overlap in this case.
Some of my images show no exif data without this fix, and with it, everything works.
Illustration of an example memory layout: