Commit d54548b9 authored by Luke Howard's avatar Luke Howard
Browse files

Use strtol() not strtoul() in integerBit{And,Or}Match matching rules

parent 8866875e
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment