diff options
author | Andre Heinecke <[email protected]> | 2018-04-20 12:30:53 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2018-04-20 12:30:53 +0000 |
commit | 7706fa2c922f5e02570b01f145ed474e82341042 (patch) | |
tree | bab29d69acc810b0d4d3f4bd4ab7d022bd2d5eb2 | |
parent | Post release updates (diff) | |
download | gpgme-7706fa2c922f5e02570b01f145ed474e82341042.tar.gz gpgme-7706fa2c922f5e02570b01f145ed474e82341042.zip |
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
-rw-r--r-- | src/op-support.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/op-support.c b/src/op-support.c index 03f274cf..9414e612 100644 --- a/src/op-support.c +++ b/src/op-support.c @@ -414,6 +414,9 @@ _gpgme_parse_failure (char *args) { char *where, *which; + if (!strncmp (args, "gpg-exit", 8)) + return 0; + where = strchr (args, ' '); if (!where) return trace_gpg_error (GPG_ERR_INV_ENGINE); @@ -425,9 +428,5 @@ _gpgme_parse_failure (char *args) if (where) *where = '\0'; - where = args; - if (!strcmp (where, "gpg-exit")) - return 0; - return atoi (which); } |