Revamp xalloc interface so that it can check for address arithmetic overflow.
[pspp] / lib / xstrdup.c
index 1182c592ac54f98e7965755b9959fbfdea610b1a..58f18beb6f9cb79818727a411e8037237170ca3f 100644 (file)
@@ -29,5 +29,5 @@
 char *
 xstrdup (const char *string)
 {
-  return strcpy (xmalloc (strlen (string) + 1), string);
+  return xclone (string, strlen (string) + 1);
 }