Re: [PATCH] Always return the empty string if decryption tries to demand a password

Subject: Re: [PATCH] Always return the empty string if decryption tries to demand a password

Date: Fri, 03 Jun 2011 16:15:14 -0700

To: Daniel Kahn Gillmor, notmuch@notmuchmail.org

Cc: Daniel Kahn Gillmor

From: Carl Worth


On Fri,  3 Jun 2011 19:03:08 -0400, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
> The notmuch binary is not in the business of doing interactive
> prompting with the user.  If credentials are needed for decryption,
> they should be supplied to the decrypting processes some other way
> (e.g. gpg-agent).
> 
> Previously, we returned a NULL function pointer for the
> request_passwd() function, which may have cause segmentation faults
> with some versions of gmime.

Cool. This fixes my segfaults, so thanks!

> +    return g_strdup ("");

Is the above correct? Or is it a memory leak? (If it's not a leak, then
GMime really has some bizarre ownership semantics.)

-Carl
part-000.sig (application/pgp-signature)

Thread: