[Date Prev][Date Next] [Chronological] [Thread] [Top]

Patch: integerNormalize/integerFilter/integerIndexer bugs (ITS#1724)



Full_Name: Hallvard B. Furuseth
Version: HEAD (2002-04-02)
OS: Linux
URL: http://folk.uio.no/hbf/OpenLDAP/integers.txt
Submission from: (NULL) (158.36.148.34)


Bugs in slapd/schema_init.c:
1. integerNormalize() did not \0-terminate the returned bv_val.
2. integer<Filter/Indexer>() returned the normalized integer as a
   hash key instead of a 4-byte hash of it.  bdb_db_hash() did not
   like that at all.

I fixed #2 by copying caseExactIA5<Filter/Indexer>() to
integer<Filter/Indexer>() and adding integerNormalize() at the
appropriate places.  I don't understand the code, but it tests out
just fine:-)