[git] GpgEX - branch, master, updated. gpgex-1.0.0-6-ge478019

by Werner Koch cvs at cvs.gnupg.org
Mon Jul 28 10:18:10 CEST 2014


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 extension for the Windows Explorer".

The branch, master has been updated
       via  e478019f36499089346b9382e90400cb04f682c6 (commit)
       via  bff2af33075ce4574c10250156267751e667753e (commit)
      from  da8aeee958e8943aad57a4b178e2f39a3897e4c6 (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 e478019f36499089346b9382e90400cb04f682c6
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jul 24 16:16:53 2014 +0200

    Fix segv in case GNUPGHOME is set.
    
    * src/registry.c (default_homedir): Return const hcar*.
    * src/client.cc (default_socket_name): Rewrite to use straightforward
    code.

diff --git a/src/client.cc b/src/client.cc
index f358453..6868835 100644
--- a/src/client.cc
+++ b/src/client.cc
@@ -55,21 +55,26 @@ _gpgex_stpcpy (char *a, const char *b)
 static const char *
 default_socket_name (void)
 {
-  static string name;
+  static char *name;
 
-  if (name.size () == 0)
+  if (!name)
     {
-      char *dir = NULL;
+      const char *dir;
+      const char sockname[] = "\\S.uiserver";
 
       dir = default_homedir ();
       if (dir)
 	{
-	  try { name = ((string) dir) + "\\S.uiserver"; } catch (...) {}
-	  free ((void *) dir);
+          name = (char *)malloc (strlen (dir) + strlen (sockname) + 1);
+          if (name)
+            {
+              strcpy (name, dir);
+              strcat (name, sockname);
+            }
 	}
     }
 
-  return name.c_str ();
+  return name;
 }
 
 
diff --git a/src/registry.c b/src/registry.c
index 4b23006..aa59549 100644
--- a/src/registry.c
+++ b/src/registry.c
@@ -236,7 +236,7 @@ standard_homedir (void)
 
 
 /* Retrieve the default home directory.  */
-char *
+const char *
 default_homedir (void)
 {
   char *dir;
diff --git a/src/registry.h b/src/registry.h
index 2eb1637..51113ab 100644
--- a/src/registry.h
+++ b/src/registry.h
@@ -41,7 +41,7 @@ char *read_w32_registry_string (const char *root, const char *dir,
 				const char *name);
 
 /* Retrieve the default home directory.  */
-char *default_homedir (void);
+const char *default_homedir (void);
 
 /* Registry key for this software.  */
 #define REGKEY "Software\\GNU\\GnuPG"

commit bff2af33075ce4574c10250156267751e667753e
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Jun 25 14:33:34 2014 +0200

    Start launch-gpa to avoid pop up console windows.
    
    * src/client.cc (default_uiserver_cmdline): Change GPA server name.

diff --git a/src/client.cc b/src/client.cc
index 8350181..f358453 100644
--- a/src/client.cc
+++ b/src/client.cc
@@ -115,7 +115,7 @@ default_uiserver_cmdline (void)
         {
           /* Kleopatra is not installed: Try GPA instead but if it is
              also not available return the Kleopatra filename.  */
-          const char gpaserver[] = "gpa.exe";
+          const char gpaserver[] = "launch-gpa.exe";
           char *name2;
 
           name2 = (char*)malloc (strlen (dir) + strlen (gpaserver)

-----------------------------------------------------------------------

Summary of changes:
 src/client.cc  |   19 ++++++++++++-------
 src/registry.c |    2 +-
 src/registry.h |    2 +-
 3 files changed, 14 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GnupG extension for the Windows Explorer
http://git.gnupg.org




More information about the Gnupg-commits mailing list