]> git.kaiwu.me - njs.git/commit
Fixed njs_property_query() while quering symbol keys.
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 19 Aug 2020 12:43:23 +0000 (12:43 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Wed, 19 Aug 2020 12:43:23 +0000 (12:43 +0000)
commita1dbf7f01579f3a0d0d541ffb15af98f05bf08c0
tree05d39d718daf81e4febbd736f90cd3bfa37b107e
parent41b49c3f49255cacf103a0e21ecdffaf61c8074c
Fixed njs_property_query() while quering symbol keys.

Since 37f1f20de909, njs_object_hash_test() requires lhq->key.start
to be NULL to avoid hash collisions.

The field is zeroed by njs_property_query_init(), but the field still
might be non-zero when njs_property_query() is called inside a loop.

The fix is to ensure lhq->key.start == NULL for symbol keys.

This closes #268 issue on Github.
src/njs_value.c
src/test/njs_unit_test.c