From 36249da6df6bd902bb0b9baaef30b1140e7a4b09 Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Thu, 23 Apr 2026 12:46:42 +0200 Subject: [PATCH] emacs30: add a patch to fix upstream bug 80851 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=80851 Fixes: #512710 Co-authored-by: LIN, Jian --- pkgs/applications/editors/emacs/sources.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/applications/editors/emacs/sources.nix b/pkgs/applications/editors/emacs/sources.nix index 3ebc5c550e25..6f0ae1c1b7da 100644 --- a/pkgs/applications/editors/emacs/sources.nix +++ b/pkgs/applications/editors/emacs/sources.nix @@ -111,6 +111,11 @@ in rev = "emacs-30.2"; hash = "sha256-W2eZ+cNQhi/fMeRkwOqSKU7Vzvp43WUOpiwaLLNEXtg="; patches = fetchpatch: [ + (fetchpatch { + name = "fix-off-by-one-mistake-80851-CVE-2026-6861.patch"; + url = "https://cgit.git.savannah.gnu.org/cgit/emacs.git/patch/?id=8f535370b9efbc91673b20c6987a5cae4f6dc562"; + hash = "sha256-ny44eIi8DUa9pQhVGzhGz4H6FXU4+ki86SITLXhkwpw="; + }) (builtins.path { name = "inhibit-lexical-cookie-warning-67916.patch"; path = ./inhibit-lexical-cookie-warning-67916-30.patch; @@ -127,5 +132,12 @@ in variant = "macport"; rev = "emacs-mac-30.2"; hash = "sha256-i/W2Xa6Vk1+T1fs6fa4wJVMLLB6BK8QAPcdmPrU8NwM="; + patches = fetchpatch: [ + (fetchpatch { + name = "fix-off-by-one-mistake-80851-CVE-2026-6861.patch"; + url = "https://cgit.git.savannah.gnu.org/cgit/emacs.git/patch/?id=8f535370b9efbc91673b20c6987a5cae4f6dc562"; + hash = "sha256-ny44eIi8DUa9pQhVGzhGz4H6FXU4+ki86SITLXhkwpw="; + }) + ]; }); }