From: Xi Lu Date: Sat, 24 Dec 2022 08:28:54 +0000 (+0800) Subject: Fix htmlfontify.el command injection vulnerability (CVE-2022-48339) X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~40^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=665489d7de786a61fa0c0883b9dffbc76487e37e;p=emacs.git Fix htmlfontify.el command injection vulnerability (CVE-2022-48339) This upstream patch has been incorporated to fix the problem: Fix htmlfontify.el command injection vulnerability. * lisp/htmlfontify.el (hfy-text-p): Fix command injection vulnerability. (Bug#60295) Origin: upstream, commit 807d2d5b3a7cd1d0e3f7dd24de22770f54f5ae16 Bug: https://debbugs.gnu.org/60295 Bug-Debian: https://bugs.debian.org/1031730 Forwarded: not-needed --- diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 115f67c9560..f8d1e205369 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1882,7 +1882,7 @@ Hardly bombproof, but good enough in the context in which it is being used." (defun hfy-text-p (srcdir file) "Is SRCDIR/FILE text? Use `hfy-istext-command' to determine this." - (let* ((cmd (format hfy-istext-command (expand-file-name file srcdir))) + (let* ((cmd (format hfy-istext-command (shell-quote-argument (expand-file-name file srcdir)))) (rsp (shell-command-to-string cmd))) (string-match "text" rsp)))