mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
Use strtol() not strtoul() in integerBit{And,Or}Match matching rules
This commit is contained in:
parent
8866875e69
commit
d54548b9a0
@ -3506,7 +3506,7 @@ integerBitAndMatch(
|
||||
long lValue, lAssertedValue;
|
||||
|
||||
/* safe to assume integers are NUL terminated? */
|
||||
lValue = strtoul(value->bv_val, NULL, 10);
|
||||
lValue = strtol(value->bv_val, NULL, 10);
|
||||
if(( lValue == LONG_MIN || lValue == LONG_MAX) && errno == ERANGE ) {
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
@ -3534,7 +3534,7 @@ integerBitOrMatch(
|
||||
long lValue, lAssertedValue;
|
||||
|
||||
/* safe to assume integers are NUL terminated? */
|
||||
lValue = strtoul(value->bv_val, NULL, 10);
|
||||
lValue = strtol(value->bv_val, NULL, 10);
|
||||
if(( lValue == LONG_MIN || lValue == LONG_MAX) && errno == ERANGE ) {
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user