core: Do not modify args for ignored failures
* src/op-support.c (_gpgme_parse_failure): Ignore gpg-exit failures before modifying args. -- For op_decrypt_verify the status handler for both decrypt and verify would parse the failure when the first parser ignored the failure. This resulted in an ERR_INV_ENGINE as the first call to parse_failure modified the args. GnuPG-Bug-Id: T3919
This commit is contained in:
parent
302ec1f9aa
commit
7706fa2c92
@ -414,6 +414,9 @@ _gpgme_parse_failure (char *args)
|
|||||||
{
|
{
|
||||||
char *where, *which;
|
char *where, *which;
|
||||||
|
|
||||||
|
if (!strncmp (args, "gpg-exit", 8))
|
||||||
|
return 0;
|
||||||
|
|
||||||
where = strchr (args, ' ');
|
where = strchr (args, ' ');
|
||||||
if (!where)
|
if (!where)
|
||||||
return trace_gpg_error (GPG_ERR_INV_ENGINE);
|
return trace_gpg_error (GPG_ERR_INV_ENGINE);
|
||||||
@ -425,9 +428,5 @@ _gpgme_parse_failure (char *args)
|
|||||||
if (where)
|
if (where)
|
||||||
*where = '\0';
|
*where = '\0';
|
||||||
|
|
||||||
where = args;
|
|
||||||
if (!strcmp (where, "gpg-exit"))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return atoi (which);
|
return atoi (which);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user