From: Lars Ingebrigtsen Date: Fri, 11 Dec 2020 14:16:05 +0000 (+0100) Subject: Fix parsing error in exif X-Git-Tag: emacs-28.0.90~4788 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=72bcc6f988350329f3c0eb2f86af17f3ed97cf40;p=emacs.git Fix parsing error in exif * lisp/image/exif.el (exif--parse-exif-chunk): The offset is a four-byte number. Reported by Alan Light . --- diff --git a/lisp/image/exif.el b/lisp/image/exif.el index 6aeb52c726d..e328fcce5a8 100644 --- a/lisp/image/exif.el +++ b/lisp/image/exif.el @@ -165,7 +165,7 @@ If the orientation isn't present in the data, return nil." ;; Another magical number. (unless (= (exif--read-number 2 le) #x002a) (signal 'exif-error "Invalid TIFF header length")) - (let ((offset (exif--read-number 2 le))) + (let ((offset (exif--read-number 4 le))) ;; Jump to where the IFD (directory) starts and parse it. (when (> (1+ offset) (point-max)) (signal 'exif-error "Invalid IFD (directory) offset"))