Access violation using gpgme

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Feb 8 19:47:47 CET 2019


On Tue 2019-02-05 18:32:31 +0000, Andre Heinecke wrote:
> On Tuesday, February 5, 2019 6:21:45 PM GMT Daniel Lo Nigro wrote:
>> I'm using gpgme_set_pinentry_mode to set the pinentry mode to "loopback",
>> and the access violation is being encountered after my pinentry callback
>> returns. It works fine if I don't use loopback, and instead use the
>> system's pinentry mechanism.
>
> This sounds like your passphrase callback returns invalid data. I would have 
> to look how the PassphraseResult is mapped in the C# bindings but from the C 
> API:
>
> The user must write the passphrase, followed by a newline character,
> to the file descriptor @var{fd}.  The function @code{gpgme_io_writen}
> should be used for the write operation.  Note that if the user returns
> 0 to indicate success, the user must at least write a newline
> character before returning from the callback.

If the data returned from the passphrase callback doesn't meet this
format, it should fail (and possibly produce a clear/helpful warning
message), but it *still* should not cause an access violation.  If it
does cause an access violation, that sounds like a bug in whatever is
handling the result.

can someone with more windows chops than i have open a bug report about
this particular problem?  linking to libgpgme should not cause crashing
behavior under any circumstance.

    --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20190208/e05beca0/attachment.sig>


More information about the Gnupg-devel mailing list