aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKousuke Kannagi <mce@FreeBSD.org>2026-07-06 02:53:48 +0000
committerJoseph Mingrone <jrm@FreeBSD.org>2026-07-06 04:27:50 +0000
commit915d199e510d37e924567bbe2740fbb8ebd0a313 (patch)
tree41e121389b269c0a7ab3b1bb2594ad571433e25d
parent06c06ed22442558db4cb0245235418240aa6176b (diff)
editors/emacs: Fix CVE-2026-6861
Upstream bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=80851 PR: 296546 Reviewed by: jrm Security: CVE-2026-6861
-rw-r--r--editors/emacs/Makefile2
-rw-r--r--editors/emacs/files/patch-src_image.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile
index 6e9c3c45e618..936790aa6f4c 100644
--- a/editors/emacs/Makefile
+++ b/editors/emacs/Makefile
@@ -1,6 +1,6 @@
PORTNAME= emacs
DISTVERSION= 30.2
-PORTREVISION= 3
+PORTREVISION= 4
PORTEPOCH= 3
CATEGORIES= editors
MASTER_SITES= GNU
diff --git a/editors/emacs/files/patch-src_image.c b/editors/emacs/files/patch-src_image.c
new file mode 100644
index 000000000000..fa39972fc05b
--- /dev/null
+++ b/editors/emacs/files/patch-src_image.c
@@ -0,0 +1,11 @@
+--- src/image.c.orig 2026-07-06 02:15:12 UTC
++++ src/image.c
+@@ -12052,7 +12052,7 @@ svg_load_image (struct frame *f, struct image *img, ch
+ {
+ css = xmalloc (SBYTES (lcss) + 1);
+ strncpy (css, SSDATA (lcss), SBYTES (lcss));
+- *(css + SBYTES (lcss) + 1) = 0;
++ *(css + SBYTES (lcss)) = 0;
+ }
+ #endif
+