git: 4c273b71a473 - stable/15 - exterror: add support for the format specifiers in the extended error msg
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 05 Jan 2026 01:25:29 UTC
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);
}