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

Fix OpenLDAP ITS#3782 - broken logic in bitwise matching rules

parent b6aa6970
......@@ -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;
}
......
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