summaryrefslogtreecommitdiff
path: root/src/xrdb.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-08-10 21:16:01 +0000
committerRichard M. Stallman <rms@gnu.org>1993-08-10 21:16:01 +0000
commit3f11e494b26e5f14566d7caf68dea97cb7d4b654 (patch)
tree71a7b3a44d64bba1874ab7f2a753e32d83479cd0 /src/xrdb.c
parent8055f9a0e10b0f2827023a4817100df6ffebc577 (diff)
downloademacs-3f11e494b26e5f14566d7caf68dea97cb7d4b654.tar.gz
(x_get_customization_string): Don't use value of strcpy.
Diffstat (limited to 'src/xrdb.c')
-rw-r--r--src/xrdb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xrdb.c b/src/xrdb.c
index ea0cbc89b31..b1a8a9ce6a2 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -113,7 +113,11 @@ x_get_customization_string (db, name, class)
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;
}