[Pkg-gnupg-commit] [gnupg2] 149/160: gpgscm: Use kludge to avoid improper use of ffi_schemify_name.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Jul 15 09:36:46 UTC 2016


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

dkg pushed a commit to branch upstream
in repository gnupg2.

commit fb14bf0a95e361b0991067e3aea2902d54be811d
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jul 14 10:52:03 2016 +0200

    gpgscm: Use kludge to avoid improper use of ffi_schemify_name.
    
    * tests/gpgscm/ffi.c (ffi_schemify_name): Use xstrdup instead of
    strdup for now.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 tests/gpgscm/ffi.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/gpgscm/ffi.c b/tests/gpgscm/ffi.c
index 21beb76..5494c4d 100644
--- a/tests/gpgscm/ffi.c
+++ b/tests/gpgscm/ffi.c
@@ -1110,9 +1110,13 @@ ffi_list2intv (scheme *sc, pointer list, int **intv, size_t *len)
 char *
 ffi_schemify_name (const char *s, int macro)
 {
-  char *n = strdup (s), *p;
-  if (n == NULL)
-    return s;
+  /* Fixme: We should use xtrystrdup and return NULL.  However, this
+   * requires a lot more changes.  Simply returning S as done
+   * originally is not an option.  */
+  char *n = xstrdup (s), *p;
+  /* if (n == NULL) */
+  /*   return s; */
+
   for (p = n; *p; p++)
     {
       *p = (char) tolower (*p);

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



More information about the Pkg-gnupg-commit mailing list