emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master f2da80d: Ignore invalid base64 encoded embedded ima


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master f2da80d: Ignore invalid base64 encoded embedded images
Date: Sun, 20 Mar 2016 12:57:20 +0000

branch: master
commit f2da80d0e1ccd121c4891e869a45aeb9c6b1795d
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>

    Ignore invalid base64 encoded embedded images
    
    * lisp/net/shr.el (shr-image-from-data): Ignore invalid base64
    encoded embedded images (bug#22928).
---
 lisp/net/shr.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 4f64618..cd55f22 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -946,7 +946,8 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
     (let ((param (match-string 4 data))
          (payload (url-unhex-string (match-string 5 data))))
       (when (string-match "^.*\\(;[ \t]*base64\\)$" param)
-       (setq payload (base64-decode-string payload)))
+       (setq payload (ignore-errors
+                        (base64-decode-string payload))))
       payload)))
 
 ;; Behind display-graphic-p test.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]