Skip to content

Fix segfault on search URI parameter with no value - #127

Open
SAY-5 wants to merge 1 commit into
lxde:masterfrom
SAY-5:fix-search-uri-null-value
Open

Fix segfault on search URI parameter with no value#127
SAY-5 wants to merge 1 commit into
lxde:masterfrom
SAY-5:fix-search-uri-null-value

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 18, 2026

Copy link
Copy Markdown

A search URI whose parameter has no value, such as search:///home?show_hidden, makes parse_search_uri() set value to NULL and then dereference it in the handler (value[0]), crashing pcmanfm. gcc -fanalyzer also flags the NULL dereference at vfs-search.c:490.

Skip a parameter that has no value instead of dereferencing NULL, freeing the parsed name and continuing with the next pair. A value-less parameter carries no information, so ignoring it matches the intended behavior.

Closes #125

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.

pcmanfm segfaults with search:/// with crafted URI with no value

1 participant