jpegview icon indicating copy to clipboard operation
jpegview copied to clipboard

Fix off-by-one errors in EXIFReader early-out guards

Open fm3 opened this issue 8 months ago • 0 comments

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:

image

fm3 avatar Apr 06 '25 12:04 fm3