Commit 32b3c766 authored by John Paul Wallington's avatar John Paul Wallington
Browse files

(image-jpeg-p): Don't search beyond length of data.

parent c577b222
2003-08-26 John Paul Wallington <>
* image.el (image-jpeg-p): Don't search beyond length of data.
2003-08-26 Martin Stjernholm <>
* progmodes/cc-cmds.el (c-electric-brace): Work around for a
......@@ -67,7 +67,8 @@ We accept the tag Exif because that is the same format."
(when (and (>= code #xe0) (<= code #xef))
;; APP0 LEN1 LEN2 "JFIF\0"
(throw 'jfif
(string-match "JFIF\\|Exif" (substring data i (+ i nbytes)))))
(string-match "JFIF\\|Exif"
(substring data i (min (+ i nbytes) len)))))
(setq i (+ i 1 nbytes))))))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment