git: 1c257703ed4c - main - shells/mksh: fix crash on 16-CURRENT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 11 Jan 2026 15:28:18 UTC
The branch main has been updated by fuz:
URL: https://cgit.FreeBSD.org/ports/commit/?id=1c257703ed4c59a485b28b17c7a1541b0c203191
commit 1c257703ed4c59a485b28b17c7a1541b0c203191
Author: Rares Aioanei <schaiba@gmail.com>
AuthorDate: 2026-01-07 13:40:24 +0000
Commit: Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-01-11 15:27:43 +0000
shells/mksh: fix crash on 16-CURRENT
Kernel now reports support for 126 signals, while the libc headers only
report 32. This mismatch caused an out-of-bounds write initialising
internal tables.
Reported by: hackee <h4ckee@proton.me>
PR: 292146
MFH: 2025Q4
---
shells/mksh/Makefile | 2 +-
shells/mksh/files/patch-pr292146 | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/shells/mksh/Makefile b/shells/mksh/Makefile
index 336fc98b9b28..6e202a7721d7 100644
--- a/shells/mksh/Makefile
+++ b/shells/mksh/Makefile
@@ -1,7 +1,7 @@
PORTNAME= mksh
PORTVERSION= 59c
DISTVERSIONPREFIX= R
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= shells
MASTER_SITES= https://www.mirbsd.org/MirOS/dist/mir/mksh/ \
https://pub.allbsd.org/MirOS/dist/mir/mksh/
diff --git a/shells/mksh/files/patch-pr292146 b/shells/mksh/files/patch-pr292146
new file mode 100644
index 000000000000..5760847c657e
--- /dev/null
+++ b/shells/mksh/files/patch-pr292146
@@ -0,0 +1,28 @@
+For PR 292146: mksh segfaults on 16-CURRENT.
+
+--- Build.sh 2020-09-05 00:02:04.000000000 +0300
++++ Build.sh.new 2026-01-06 12:05:33.268065000 +0200
+@@ -26,6 +26,11 @@
+ #
+ # Used environment documentation is at the end of this file.
+
++HAVE_SYS_SIGNAME=0
++HAVE__SYS_SIGNAME=0
++HAVE_SYS_SIGLIST=0
++HAVE__SYS_SIGLIST=0
++
+ LC_ALL=C; LANGUAGE=C
+ export LC_ALL; unset LANGUAGE
+
+--- histrap.c 2020-10-02 01:53:47.000000000 +0300
++++ histrap.c.new 2026-01-06 12:05:40.049235000 +0200
+@@ -1106,7 +1106,8 @@
+ #if HAVE_SYS_SIGLIST
+ sigtraps[i].mess = sys_siglist[i];
+ #elif HAVE_STRSIGNAL
+- sigtraps[i].mess = strsignal(i);
++ //sigtraps[i].mess = strsignal(i);
++ strdupx(sigtraps[i].mess, strsignal(i), APERM);
+ #else
+ sigtraps[i].mess = NULL;
+ #endif