Date: Mon, 29 Dec 2025 12:24:01 +0000 From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Eric Blake <eblake@redhat.com> Subject: git: 4cea8771f773 - stable/13 - m4: Fix OOB access displaying MIN_INT Message-ID: <695272e1.32892.7716401@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4cea8771f77330537c99da8d3db2bde315954759 commit 4cea8771f77330537c99da8d3db2bde315954759 Author: Eric Blake <eblake@redhat.com> AuthorDate: 2025-05-24 17:21:38 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2025-12-29 12:20:29 +0000 m4: Fix OOB access displaying MIN_INT Previously displaying INT_MIN resulted in an out of bounds access to digits[-8]. In twos-complement -INT_MIN is still negative. PR: 287013 Reviewed by: emaste (cherry picked from commit ab4edcd552c967a400e85afc0fd3e6729fa9ee2c) --- usr.bin/m4/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/m4/misc.c b/usr.bin/m4/misc.c index 4533e106a37f..73ced384466c 100644 --- a/usr.bin/m4/misc.c +++ b/usr.bin/m4/misc.c @@ -122,7 +122,7 @@ void pbnumbase(int n, int base, int d) { static char digits[36] = "0123456789abcdefghijklmnopqrstuvwxyz"; - int num; + unsigned int num; int printed = 0; if (base > 36)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695272e1.32892.7716401>
