mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-09 02:52:04 +08:00
Avoid integer truncation of v1->bv_len - v2->bv_len in value_cmp(,,SYNTAX_BIN,)
This commit is contained in:
parent
2527e0d878
commit
3f6dc76a59
@ -134,8 +134,9 @@ value_cmp(
|
||||
break;
|
||||
|
||||
case SYNTAX_BIN:
|
||||
rc = ( v1->bv_len == v2->bv_len ) ? memcmp( v1->bv_val,
|
||||
v2->bv_val, v1->bv_len ) : v1->bv_len - v2->bv_len ;
|
||||
rc = (v1->bv_len == v2->bv_len
|
||||
? memcmp( v1->bv_val, v2->bv_val, v1->bv_len )
|
||||
: v1->bv_len > v2->bv_len ? 1 : -1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user