[git] GPGME - branch, master, updated. gpgme-1.9.0-57-gd3796e4
by Andre Heinecke
cvs at cvs.gnupg.org
Thu Jul 27 14:25:10 CEST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".
The branch, master has been updated
via d3796e4504a2b4f422de17d78f3acfe8dd199c9c (commit)
from c7be41a5f850addceb2a95444bad2a31cdcd1ce5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d3796e4504a2b4f422de17d78f3acfe8dd199c9c
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Thu Jul 27 14:20:58 2017 +0200
core: Fix status parsing for decrypt + verify
* src/decrypt.c (parse_status_error): Don't modify args.
--
Otherwise chained status handlers will not see the full args
which resulted in a parse error in the verify status handler.
GnuPG-Bug-Id: T3310
diff --git a/src/decrypt.c b/src/decrypt.c
index aa17771..eb7ec4d 100644
--- a/src/decrypt.c
+++ b/src/decrypt.c
@@ -145,10 +145,18 @@ parse_status_error (char *args, op_data_t opd)
gpgme_error_t err;
char *field[3];
int nfields;
+ char *args2;
- nfields = _gpgme_split_fields (args, field, DIM (field));
+ if (!args)
+ return trace_gpg_error (GPG_ERR_INV_ENGINE);
+
+ args2 = strdup (args); /* Split modifies the input string. */
+ nfields = _gpgme_split_fields (args2, field, DIM (field));
if (nfields < 1)
- return trace_gpg_error (GPG_ERR_INV_ENGINE); /* Required arg missing. */
+ {
+ free (args2);
+ return trace_gpg_error (GPG_ERR_INV_ENGINE); /* Required arg missing. */
+ }
err = nfields < 2 ? 0 : atoi (field[1]);
if (!strcmp (field[0], "decrypt.algorithm"))
@@ -159,7 +167,10 @@ parse_status_error (char *args, op_data_t opd)
{
opd->result.unsupported_algorithm = strdup (field[2]);
if (!opd->result.unsupported_algorithm)
- return gpg_error_from_syserror ();
+ {
+ free (args2);
+ return gpg_error_from_syserror ();
+ }
}
}
else if (!strcmp (field[0], "decrypt.keyusage"))
@@ -193,6 +204,7 @@ parse_status_error (char *args, op_data_t opd)
}
+ free (args2);
return 0;
}
-----------------------------------------------------------------------
Summary of changes:
src/decrypt.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org
More information about the Gnupg-commits
mailing list