From 5134fee5b090d68b19924ccad1994ce37732b91c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 26 Aug 2009 08:55:57 +0000 Subject: Implement tilde expansion in the same was as 1.4. --- jnlib/t-support.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'jnlib/t-support.c') 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; } -- cgit