From 52a0cc593d0b6d018f3e17afdadcec737679f175 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Jul 11 2013 16:59:58 +0000 Subject: Ticket 47427 - Overflow in nsslapd-disk-monitoring-threshold Bug Description: The threshold setting was being stored as an "int" instead of a PRUint64. Config setting validation was also incomplete. Fix Description: Fix build warning caused by previous commit. https://fedorahosted.org/389/ticket/47427 (cherry picked from commit 5724e02c7f30ef1130764c79b30edd04954663a7) (cherry picked from commit 1b7135cc79114a41be147d6bac7f4353207623f1) (cherry picked from commit b95142f08de7e3b7f66a395640709b80e7735bfd) --- diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c index e3f3b93..59879f7 100644 --- a/ldap/servers/slapd/libglobs.c +++ b/ldap/servers/slapd/libglobs.c @@ -1252,7 +1252,7 @@ config_set_disk_threshold( const char *attrname, char *value, char *errorbuf, in if ( *endp != '\0' || threshold <= 4096 || errno == ERANGE ) { PR_snprintf ( errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, - "%s: \"%s\" is invalid, threshold must be greater than 4096 and less then %llu", + "%s: \"%s\" is invalid, threshold must be greater than 4096 and less then %lu", attrname, value, LONG_MAX ); retVal = LDAP_OPERATIONS_ERROR; return retVal;