libucl icon indicating copy to clipboard operation
libucl copied to clipboard

fix corner case in ucl_object_lookup_path_char

Open zukatsinadze opened this issue 10 months ago • 0 comments

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
============================================================================


zukatsinadze avatar Feb 13 '25 18:02 zukatsinadze