Skip to content

Reject dependency whose repo slug parses to NULL author or name - #348

Open
SAY-5 wants to merge 1 commit into
clibs:masterfrom
SAY-5:fix-dependency-new-null-slug
Open

SAY-5 wants to merge 1 commit into
clibs:masterfrom
SAY-5:fix-dependency-new-null-slug

Conversation

@SAY-5

@SAY-5 SAY-5 commented Aug 23, 2026

Copy link
Copy Markdown

Fixes #347.

clib_package_dependency_new() stored the results of clib_package_parse_name() and clib_package_parse_author() without checking them, so a dependency key that parses to a NULL name or author (an empty key, one starting with /, or an @-scoped key) produced a half-built dependency that later crashed clib_package_slug() when it called strlen() on the NULL. This rejects such a dependency up front, mirroring the existing !repo || !version guard, and adds the malformed-key cases to the dependency test.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
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.

clib install segfaults on a manifest whose dependency key starts with "@" (NULL deref in clib_package_slug)

2 participants