Skip to content

fix corner case in ucl_object_lookup_path_char#316

Open
zukatsinadze wants to merge 1 commit intovstakhov:masterfrom
zukatsinadze:fix_object_lookup_path_char
Open

fix corner case in ucl_object_lookup_path_char#316
zukatsinadze wants to merge 1 commit intovstakhov:masterfrom
zukatsinadze:fix_object_lookup_path_char

Conversation

@zukatsinadze
Copy link
Contributor

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 zukatsinadze changed the title fix corner case in ucl_oject_lookup_path_char fix corner case in ucl_object_lookup_path_char Feb 14, 2025
@zukatsinadze zukatsinadze force-pushed the fix_object_lookup_path_char branch from e9b7755 to a6c1649 Compare February 14, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant