From 9762fed841fba823f294fe652561850289d7e828 Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Thu, 25 Jul 2013 17:01:54 -0400
Subject: [PATCH] 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: ?
---
 ldap/servers/slapd/libglobs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index 16150a5..00cfa89 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -1667,7 +1667,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 )) {
-- 
1.7.1

