]> git.sur5r.net Git - openldap/commitdiff
ITS#4672 fix.
authorQuanah Gibson-Mount <quanah@openldap.org>
Fri, 6 Oct 2006 01:41:13 +0000 (01:41 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Fri, 6 Oct 2006 01:41:13 +0000 (01:41 +0000)
CHANGES
servers/slapd/schema_init.c

diff --git a/CHANGES b/CHANGES
index 91d1d668051fed22d5b2927223ba4b888b183a4d..cd65006ceb683755f89c2a461dd1e1048e4d7d79 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,7 @@ OpenLDAP 2.3.28 Engineering
        Fixed slapd global access controls initialization (ITS#4654)
        Fixed slapd setting c_sasl_bindop only on SASL binds
        Fixed slapd return code not being propagated (ITS#4565)
+       Fixed slapd integerBitAndMatch (ITS#4672)
        Fixed slapd-ldap retry with idassert (ITS#4686)
        Fixed slapd-monitor locking with scope "subordinate" (ITS#4668)
        Fixed slapd-perl deletes (ITS#2612)
index e0a0600542be8973823c6bc0019f161ea7dde35e..fc126f127fa8e567128bbc85dad715a61cd1894e 100644 (file)
@@ -2354,16 +2354,11 @@ numericStringNormalize(
  * Integer conversion macros that will use the largest available
  * type.
  */
-#if defined(HAVE_STRTOLL) && defined(LLONG_MAX) \
-       && defined(LLONG_MIN) && defined(HAVE_LONG_LONG)
+#if defined(HAVE_STRTOLL) && defined(HAVE_LONG_LONG)
 # define SLAP_STRTOL(n,e,b)  strtoll(n,e,b) 
-# define SLAP_LONG_MAX       LLONG_MAX
-# define SLAP_LONG_MIN       LLONG_MIN
 # define SLAP_LONG           long long
 #else
 # define SLAP_STRTOL(n,e,b)  strtol(n,e,b)
-# define SLAP_LONG_MAX       LONG_MAX
-# define SLAP_LONG_MIN       LONG_MIN
 # define SLAP_LONG           long
 #endif /* HAVE_STRTOLL ... */
 
@@ -2378,18 +2373,17 @@ integerBitAndMatch(
 {
        SLAP_LONG lValue, lAssertedValue;
 
+       errno = 0;
        /* safe to assume integers are NUL terminated? */
        lValue = SLAP_STRTOL(value->bv_val, NULL, 10);
-       if(( lValue == SLAP_LONG_MIN || lValue == SLAP_LONG_MAX) &&
-               errno == ERANGE )
+       if( errno == ERANGE )
        {
                return LDAP_CONSTRAINT_VIOLATION;
        }
 
        lAssertedValue = SLAP_STRTOL(((struct berval *)assertedValue)->bv_val,
                NULL, 10);
-       if(( lAssertedValue == SLAP_LONG_MIN || lAssertedValue == SLAP_LONG_MAX ) &&
-               errno == ERANGE )
+       if( errno == ERANGE )
        {
                return LDAP_CONSTRAINT_VIOLATION;
        }
@@ -2409,18 +2403,17 @@ integerBitOrMatch(
 {
        SLAP_LONG lValue, lAssertedValue;
 
+       errno = 0;
        /* safe to assume integers are NUL terminated? */
        lValue = SLAP_STRTOL(value->bv_val, NULL, 10);
-       if(( lValue == SLAP_LONG_MIN || lValue == SLAP_LONG_MAX ) &&
-               errno == ERANGE )
+       if( errno == ERANGE )
        {
                return LDAP_CONSTRAINT_VIOLATION;
        }
 
        lAssertedValue = SLAP_STRTOL( ((struct berval *)assertedValue)->bv_val,
                NULL, 10);
-       if(( lAssertedValue == SLAP_LONG_MIN || lAssertedValue == SLAP_LONG_MAX ) &&
-               errno == ERANGE )
+       if( errno == ERANGE )
        {
                return LDAP_CONSTRAINT_VIOLATION;
        }