changeset 4538:0fd9dd894f9f

(x_get_customization_string): Don't use value of strcpy.
author Richard M. Stallman <rms@gnu.org>
date Tue, 10 Aug 1993 21:16:01 +0000
parents 14f38c0332a4
children 3541cdf85881
files src/xrdb.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xrdb.c	Tue Aug 10 20:35:31 1993 +0000
+++ b/src/xrdb.c	Tue Aug 10 21:16:01 1993 +0000
@@ -113,7 +113,11 @@
   result = x_get_string_resource (db, full_name, full_class);
 
   if (result)
-    return strcpy ((char *) malloc (strlen (result) + 1), result);
+    {
+      char *copy = (char *) malloc (strlen (result) + 1);
+      strcpy (copy, result);
+      return copy;
+    }
   else
     return 0;
 }