[Pkg-gnupg-commit] [gpgme] 31/103: core: Don't split gpgconf strings on comma

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Dec 14 18:53:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gpgme.

commit df4eb611e33dcab7bebf07b13734c7db7ccf40da
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Apr 5 18:23:48 2017 +0200

    core: Don't split gpgconf strings on comma
    
    * src/engine-gpgconf.c (gpgconf_parse_option): Don't split
    strings on comma.
    
    --
    This only affects values where the main type is string. Values
    with the alt_type string but another main type are still split
    to keep lists (e.g. groups) working.
---
 src/engine-gpgconf.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/engine-gpgconf.c b/src/engine-gpgconf.c
index 6f7c8ac..af5f110 100644
--- a/src/engine-gpgconf.c
+++ b/src/engine-gpgconf.c
@@ -399,7 +399,7 @@ gpgconf_parse_option (gpgme_conf_opt_t opt,
 		      gpgme_conf_arg_t *arg_p, char *line)
 {
   gpgme_error_t err;
-  char *mark;
+  char *mark = NULL;
 
   if (!line[0])
     return 0;
@@ -408,7 +408,8 @@ gpgconf_parse_option (gpgme_conf_opt_t opt,
     {
       gpgme_conf_arg_t arg;
 
-      mark = strchr (line, ',');
+      if (opt->type != GPGME_CONF_STRING)
+        mark = strchr (line, ',');
       if (mark)
 	*mark = '\0';
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git



More information about the Pkg-gnupg-commit mailing list