1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-03 22:48:03 +02:00

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@gnupg.org>
This commit is contained in:
Werner Koch 2016-07-14 10:52:03 +02:00
parent c98995efef
commit fb14bf0a95
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

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