From: Howard Chu Date: Wed, 21 Nov 2007 03:07:09 +0000 (+0000) Subject: integer indexing must be unsigned X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~412 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dd39c0a6fd894b9acb1646417f5d881d940fa10a;p=openldap integer indexing must be unsigned --- diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index 960c55623c..6bdd95cf75 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -2180,6 +2180,8 @@ integerIndexer( keys[i].bv_val[0] = iv.bv_len; memcpy( keys[i].bv_val+1, iv.bv_val, index_intlen ); } + /* convert signed to unsigned */ + keys[i].bv_val[1] ^= 0x80; } *keysp = keys; rc = 0; @@ -2245,6 +2247,9 @@ integerFilter( keys[0].bv_val[0] = iv.bv_len; memcpy( keys[0].bv_val+1, iv.bv_val, index_intlen ); } + /* convert signed to unsigned */ + keys[0].bv_val[1] ^= 0x80; + rc = 0; *keysp = keys; leave: