From dd39c0a6fd894b9acb1646417f5d881d940fa10a Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 21 Nov 2007 03:07:09 +0000 Subject: [PATCH] integer indexing must be unsigned --- servers/slapd/schema_init.c | 5 +++++ 1 file changed, 5 insertions(+) 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: -- 2.39.5