diff options
Diffstat (limited to '')
-rw-r--r-- | jnlib/t-support.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jnlib/t-support.c b/jnlib/t-support.c index 756c54c7f..d8eba3b59 100644 --- a/jnlib/t-support.c +++ b/jnlib/t-support.c @@ -56,7 +56,10 @@ gcry_xmalloc (size_t n) char * gcry_strdup (const char *string) { - return malloc (strlen (string)+1); + char *p = malloc (strlen (string)+1); + if (p) + strcpy (p, string); + return p; } |