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

pk-offline-update: Fix crash during error cases #753

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

sidt4
Copy link
Contributor

@sidt4 sidt4 commented May 16, 2024

g_prefix_error() does nothing if the error or *error is NULL. So, we crash when accessing error->message.

Also, the error message is not propagated to the caller due to this issue.

'g_prefix_error()' does nothing if the 'error' or '*error' is
NULL. So, we crash when accessing 'error->message'. Also, the error
message is not propagated to the caller due to this issue.
@ximion
Copy link
Collaborator

ximion commented Jun 5, 2024

I checked the callers, this should indeed be a fresh error, and not a prefixed one (which makes sense, as per API conventions).

So yeah, nice find and thanks for the fix!

@ximion ximion merged commit 739e75e into PackageKit:main Jun 5, 2024
3 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