From 72bcc6f988350329f3c0eb2f86af17f3ed97cf40 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 11 Dec 2020 15:16:05 +0100 Subject: [PATCH] Fix parsing error in exif * lisp/image/exif.el (exif--parse-exif-chunk): The offset is a four-byte number. Reported by Alan Light . --- lisp/image/exif.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")) -- 2.39.2