Repository navigation
Conversation
Keep the mutable basename pointer when stripping .conf or .ucl from an automatically generated include prefix. Searching through params->prefix uses a const pointer, which can discard qualifiers on platforms where the C library's string functions preserve the constness of their argument.
got_content is a bool pointer that is always non-NULL and has already been dereferenced; by this point *got_content is known to be true, so the check is redundant (CodeQL).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three independent one-line-ish fixes, each in its own commit:
ucl_msgpack_consumeprints a(uintmax_t)value with%zu, which is wrong on 32-bit platforms; use%ju.char *returned bybasename()while stripping.conf/.ucl, instead of round-tripping through the constparams->prefix; avoids discarded-qualifier diagnostics with const-preserving C library string functions.got_contentis a non-NULL pointer that is already dereferenced there (CodeQL finding).Built and ran the full test suite (21/21 pass) on current master.