mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Fix OpenLDAP ITS#3782 - broken logic in bitwise matching rules
This commit is contained in:
parent
b6aa697000
commit
f90800667d
@ -2321,7 +2321,7 @@ integerBitAndMatch(
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
||||
*matchp = (lValue & lAssertedValue) ? 0 : 1;
|
||||
*matchp = ((lValue & lAssertedValue) == lAssertedValue) ? 0 : 1;
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
@ -2352,7 +2352,7 @@ integerBitOrMatch(
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
||||
*matchp = (lValue | lAssertedValue) ? 0 : -1;
|
||||
*matchp = ((lValue & lAssertedValue) != 0) ? 0 : -1;
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user