From 7c4445aed4979cbea7967da649a4581ecbdb21d2 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 7 Dec 2002 18:34:25 +0000 Subject: [PATCH] Avoid magic constant (32) in allocation. Use sizeof instead --- servers/slapd/daemon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index a0a9f1cbb5..ab9c202f07 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -1560,8 +1560,9 @@ slapd_daemon_task( gid_t gid; if( getpeereid( s, &uid, &gid ) == 0 ) { - authid = ch_malloc( sizeof("uidNumber=+gidNumber=+," - "cn=peercred,cn=external,cn=auth") + 32); + authid = ch_malloc( + sizeof("uidNumber=XXXXXX+gidNumber=XXXXXX," + "cn=peercred,cn=external,cn=auth")); sprintf(authid, "uidNumber=%d+gidNumber=%d," "cn=peercred,cn=external,cn=auth", uid, gid); -- 2.39.5