changeset 110682:ba6a1c230532

gnus-html.el (gnus-html-prefetch-images): Adjust regexp to avoid regexp backtrace overflows.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Fri, 01 Oct 2010 13:33:03 +0000
parents 3d4521b949df
children 55c8c3ca3d48
files lisp/gnus/ChangeLog lisp/gnus/gnus-html.el
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Fri Oct 01 06:06:44 2010 -0700
+++ b/lisp/gnus/ChangeLog	Fri Oct 01 13:33:03 2010 +0000
@@ -1,5 +1,8 @@
 2010-10-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+	* gnus-html.el (gnus-html-prefetch-images): Adjust regexp to avoid
+	regexp backtrace overflows.
+
 	* nnimap.el (nnimap-extend-tls-programs): Only extend those programs
 	for starttls that tls.el implements; i.e. openssl.
 
--- a/lisp/gnus/gnus-html.el	Fri Oct 01 06:06:44 2010 -0700
+++ b/lisp/gnus/gnus-html.el	Fri Oct 01 13:33:03 2010 +0000
@@ -500,7 +500,7 @@
     (let ((blocked-images (with-current-buffer summary
                             gnus-blocked-images)))
       (save-match-data
-	(while (re-search-forward "<img.*src=[\"']\\([^\"']+\\)" nil t)
+	(while (re-search-forward "<img[^>]+src=[\"']\\([^\"']+\\)" nil t)
 	  (let ((url (gnus-html-encode-url (match-string 1))))
 	    (unless (gnus-html-image-url-blocked-p url blocked-images)
               (when (gnus-html-cache-expired url gnus-html-image-cache-ttl)