Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jan 2026 01:25:29 +0000
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4c273b71a473 - stable/15 - exterror: add support for the format specifiers in the extended error msg
Message-ID:  <695b1309.37d65.64aaa7d@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=4c273b71a473ca571c331e5d9d8cedeed024649c

commit 4c273b71a473ca571c331e5d9d8cedeed024649c
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-12-27 13:54:42 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-01-05 00:44:19 +0000

    exterror: add support for the format specifiers in the extended error msg
    
    (cherry picked from commit 8bff95f3ce0396ff40b4f7d943ea856ac3f846c3)
---
 lib/libc/gen/uexterr_format.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/libc/gen/uexterr_format.c b/lib/libc/gen/uexterr_format.c
index e8ddfbd578e3..68cd2abfe312 100644
--- a/lib/libc/gen/uexterr_format.c
+++ b/lib/libc/gen/uexterr_format.c
@@ -29,7 +29,8 @@ __uexterr_format(const struct uexterror *ue, char *buf, size_t bufsz)
 		    ue->error, ue->cat, ue->src_line,
 		    (uintmax_t)ue->p1, (uintmax_t)ue->p2);
 	} else {
-		strlcpy(buf, ue->msg, bufsz);
+		snprintf(buf, bufsz, ue->msg, (uintmax_t)ue->p1,
+		    (uintmax_t)ue->p2);
 	}
 	return (0);
 }


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?695b1309.37d65.64aaa7d>