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

ascli_refresh_cache: fix NULL pointer dereference #432

Merged
merged 1 commit into from Sep 19, 2022
Merged

ascli_refresh_cache: fix NULL pointer dereference #432

merged 1 commit into from Sep 19, 2022

Conversation

r-ricci
Copy link
Contributor

@r-ricci r-ricci commented Sep 19, 2022

The command appstreamcli refresh-cache --cachepath /tmp/cache segfaults. In this code path, ret (initialized to FALSE) is not updated when as_pool_load returns successfully and sets the error pointer to NULL. Then the code tries to print error->message.

The command `appstreamcli refresh-cache --cachepath /tmp/cache`
segfaults. In this code path, `ret` (initialized to `FALSE`) is not
updated when `as_pool_load` returns successfully and sets the `error`
pointer to NULL. Then the code tries to print `error->message`.
@ximion
Copy link
Owner

ximion commented Sep 19, 2022

Nice, thank you for the patch! I am honestly surprised that static analysis didn't catch that before!

@ximion ximion merged commit 27adc35 into ximion:master Sep 19, 2022
9 checks passed
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.

None yet

2 participants