From 920bb3f883b5e678ab95fd8e9bcf25e92dbb7e84 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Jul 25 2013 21:27:16 +0000 Subject: Ticket 47427 - Overflow in nsslapd-disk-monitoring-threshold Bug Description: If you directory try and set the threshold to -2, the server allows it, but it should be rejected. Fix Description: Use a signed int when parsing the value. https://fedorahosted.org/389/ticket/47427 https://bugzilla.redhat.com/show_bug.cgi?id=984970 Reviewed by: richm(Thanks!) --- diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c index 0dc4cf5..cf1f73e 100644 --- a/ldap/servers/slapd/libglobs.c +++ b/ldap/servers/slapd/libglobs.c @@ -1228,7 +1228,7 @@ config_set_disk_threshold( const char *attrname, char *value, char *errorbuf, in { slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); int retVal = LDAP_SUCCESS; - PRUint64 threshold = 0; + PRInt64 threshold = 0; char *endp = NULL; if ( config_value_is_null( attrname, value, errorbuf, 0 )) {