mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
fix bitwise matching (courtesy of Luke Howard)
This commit is contained in:
parent
bcf7b47079
commit
71aecea2aa
@ -3545,7 +3545,7 @@ integerBitAndMatch(
|
||||
if(( lAssertedValue == LONG_MIN || lAssertedValue == LONG_MAX) && errno == ERANGE )
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
|
||||
*matchp = (lValue & lAssertedValue);
|
||||
*matchp = (lValue & lAssertedValue) ? 0 : 1;
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
@ -3569,7 +3569,7 @@ integerBitOrMatch(
|
||||
if(( lAssertedValue == LONG_MIN || lAssertedValue == LONG_MAX) && errno == ERANGE )
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
|
||||
*matchp = (lValue | lAssertedValue);
|
||||
*matchp = (lValue | lAssertedValue) ? 0 : -1;
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user