Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix corner case in ucl_object_lookup_path_char #316

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zukatsinadze
Copy link

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