libucl
libucl copied to clipboard
fix corner case in ucl_object_lookup_path_char
Hi @vstakhov,
We found this corner case in ucl_object_lookup_path_char
If called with ucl_object_lookup_path_char (obj, "", '\0')
/* Skip leading dots */
while (*p == sep) {
p ++;
}
This while loop will increment out of bounds.
Test output:
PASS: basic.test
PASS: generate.test
PASS: schema.test
PASS: msgpack.test
PASS: speed.test
============================================================================
Testsuite summary for libucl 0.9.2
============================================================================
# TOTAL: 6
# PASS: 6
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================