aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Paul Wallington2003-08-26 15:38:36 +0000
committerJohn Paul Wallington2003-08-26 15:38:36 +0000
commit32b3c766421819026320d6429529b6bf9b59f68e (patch)
tree0c89a687e52c8724ab36e071444791ba4a4a9784
parentc577b2225a8c8e84be77822e30c2d739b699c471 (diff)
downloademacs-32b3c766421819026320d6429529b6bf9b59f68e.tar.gz
emacs-32b3c766421819026320d6429529b6bf9b59f68e.zip
(image-jpeg-p): Don't search beyond length of data.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/image.el3
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 495fc5fa36e..334d3bd462e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12003-08-26 John Paul Wallington <jpw@gnu.org>
2
3 * image.el (image-jpeg-p): Don't search beyond length of data.
4
12003-08-26 Martin Stjernholm <bug-cc-mode@gnu.org> 52003-08-26 Martin Stjernholm <bug-cc-mode@gnu.org>
2 6
3 * progmodes/cc-cmds.el (c-electric-brace): Work around for a 7 * progmodes/cc-cmds.el (c-electric-brace): Work around for a
diff --git a/lisp/image.el b/lisp/image.el
index 25d05c9902f..5f603ccdd12 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -67,7 +67,8 @@ We accept the tag Exif because that is the same format."
67 (when (and (>= code #xe0) (<= code #xef)) 67 (when (and (>= code #xe0) (<= code #xef))
68 ;; APP0 LEN1 LEN2 "JFIF\0" 68 ;; APP0 LEN1 LEN2 "JFIF\0"
69 (throw 'jfif 69 (throw 'jfif
70 (string-match "JFIF\\|Exif" (substring data i (+ i nbytes))))) 70 (string-match "JFIF\\|Exif"
71 (substring data i (min (+ i nbytes) len)))))
71 (setq i (+ i 1 nbytes)))))))) 72 (setq i (+ i 1 nbytes))))))))
72 73
73 74