Fix invalid object key hashing in json_unpack() strict checking mode
authorPetri Lehtinen <petri@digip.org>
Wed, 30 Mar 2011 09:57:24 +0000 (12:57 +0300)
committerPetri Lehtinen <petri@digip.org>
Wed, 30 Mar 2011 09:57:48 +0000 (12:57 +0300)
commit0944ac8d91ad6a02c44d6166f46c6c0183147976
tree85258f027fafd20a543c443e01046429e3da35d8
parent279d8bf108bd1367bdd3647e881146e1acf0123d
Fix invalid object key hashing in json_unpack() strict checking mode

The keys which are stored temporarily to a hashtable to make sure that
all object keys are unpacked, were hashed with the object key hashing
function. It is meant to compute hashes for object_key_t values, and
it works incorrectly for plain strings.

Fixed by introducing suitable functions for hashing and comparing
strings for string-keyed hashtables.
src/jansson_private.h
src/pack_unpack.c
src/value.c
test/suites/api/test_unpack.c