From dde00b2f6848a38e9fdbe1e4c85373c8b12944b4 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 12 Apr 2011 22:30:45 -0700 Subject: Convert malloc(strlen()); strcpy() sets to strdup Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/FSWrap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'nx-X11/lib/X11/FSWrap.c') diff --git a/nx-X11/lib/X11/FSWrap.c b/nx-X11/lib/X11/FSWrap.c index df65654a9..043e5dc3a 100644 --- a/nx-X11/lib/X11/FSWrap.c +++ b/nx-X11/lib/X11/FSWrap.c @@ -85,10 +85,9 @@ _XParseBaseFontNameList( if (!*str) return (char **)NULL; - if (!(ptr = Xmalloc((unsigned)strlen(str) + 1))) { + if (!(ptr = strdup(str))) { return (char **)NULL; } - strcpy(ptr, str); psave = ptr; /* somebody who specifies more than XMAXLIST basefontnames will lose */ -- cgit v1.2.3