From 5bf859173c7e930b866a02f31eea8cf11eb859db Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Jul 25 2013 21:16:14 +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 Reviewed by: richm(Thanks!) (cherry picked from commit 0b30980695509347d8f883ac4405fa727041269f) --- diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c index 4977c60..ed197dd 100644 --- a/ldap/servers/slapd/libglobs.c +++ b/ldap/servers/slapd/libglobs.c @@ -1240,7 +1240,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 )) {