diff options
| author | Richard M. Stallman | 1993-08-10 21:16:01 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-08-10 21:16:01 +0000 |
| commit | abfc2e5fd21a2f8430fff7af6b9481a0a9a8a0db (patch) | |
| tree | fc7c29d3ebf64587020168e9cc229a4b1e0a9276 | |
| parent | b3bf02fa6141fefc4238fc6a6dd45063a8751d45 (diff) | |
| download | emacs-abfc2e5fd21a2f8430fff7af6b9481a0a9a8a0db.tar.gz emacs-abfc2e5fd21a2f8430fff7af6b9481a0a9a8a0db.zip | |
(x_get_customization_string): Don't use value of strcpy.
| -rw-r--r-- | src/xrdb.c | 6 |
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) | |||
| 113 | result = x_get_string_resource (db, full_name, full_class); | 113 | result = x_get_string_resource (db, full_name, full_class); |
| 114 | 114 | ||
| 115 | if (result) | 115 | if (result) |
| 116 | return strcpy ((char *) malloc (strlen (result) + 1), result); | 116 | { |
| 117 | char *copy = (char *) malloc (strlen (result) + 1); | ||
| 118 | strcpy (copy, result); | ||
| 119 | return copy; | ||
| 120 | } | ||
| 117 | else | 121 | else |
| 118 | return 0; | 122 | return 0; |
| 119 | } | 123 | } |