git: 69e20977a468 - main - acl_to_text_nfs4.c: Fix a snprintf() for large uid
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 13 Jun 2026 21:17:57 UTC
The branch main has been updated by rmacklem:
URL: https://cgit.FreeBSD.org/src/commit/?id=69e20977a468c9e570ee896ed7cf04969e86756d
commit 69e20977a468c9e570ee896ed7cf04969e86756d
Author: Nick Price <nick_spun.io>
AuthorDate: 2026-06-13 21:15:17 +0000
Commit: Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-06-13 21:15:17 +0000
acl_to_text_nfs4.c: Fix a snprintf() for large uid
Commit 6e7c10c79dea fixed a couple of snprintf()s for large
uid/gid numbers above 2Gig. This patch fixes another one.
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D57561
---
lib/libc/posix1e/acl_to_text_nfs4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libc/posix1e/acl_to_text_nfs4.c b/lib/libc/posix1e/acl_to_text_nfs4.c
index 4f19f3a9a7b2..44d98efab6ce 100644
--- a/lib/libc/posix1e/acl_to_text_nfs4.c
+++ b/lib/libc/posix1e/acl_to_text_nfs4.c
@@ -158,7 +158,7 @@ format_additional_id(char *str, size_t size, const acl_entry_t entry)
id = (uid_t *)acl_get_qualifier(entry);
if (id == NULL)
return (-1);
- snprintf(str, size, ":%d", (unsigned int)*id);
+ snprintf(str, size, ":%ju", (uintmax_t)*id);
acl_free(id);
}