[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-382-gba1f90ef6
Jonathan Boeing
jonathan at claws-mail.org
Wed Dec 8 00:07:15 CET 2021
On Tue, 7 Dec 2021 10:35:38 +0100 (CET)
wwp at claws-mail.org wrote:
> Fix a crash in case of invalid crypto engine (gpgme_op_verify
> failed).
>
> diff --git a/src/plugins/smime/smime.c b/src/plugins/smime/smime.c
> index e920936ae..a56cc2206 100644
> --- a/src/plugins/smime/smime.c
> +++ b/src/plugins/smime/smime.c
> @@ -374,7 +374,7 @@ static gint check_pkcs7_mime_sig(MimeInfo
> *mimeinfo, GTask *task;
> PKCS7MimeTaskData *task_data;
> SigCheckTaskResult *task_result;
> - GError *error;
> + GError *error = NULL;
> gboolean unref_cancellable = FALSE;
>
> debug_print("Checking pkcs7-mime signature\n");
> @@ -452,9 +452,9 @@ static gint check_pkcs7_mime_sig(MimeInfo
> *mimeinfo, }
>
> if (task_result == NULL) {
> - debug_print("sig check task propagated NULL task:%p
> GError: domain:%s code:%d message:\"%s\"\n",
> + debug_print("sig check task propagated NULL task: %p
> GError: domain: %s code: %d message: \"%s\"\n", task,
> g_quark_to_string(error->domain), error->code, error->message);
> - g_object_unref(task);
> + g_object_unref(task);
> g_error_free(error);
> return -1;
> }
Do you have a testcase to trigger the crash?
I assume it's going through the task_result == NULL path but the GError
wasn't set by g_task_propagate_pointer(). If that's the case, I think
there's going to be more fixing needed. I was expecting a null task
result to always have an error along with it, so pgpmine/inline would
likely have the same problem as well.
Regards,
Jonathan
More information about the Commits
mailing list