projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revamp xalloc interface so that it can check for address arithmetic overflow.
[pspp]
/
lib
/
xstrdup.c
diff --git
a/lib/xstrdup.c
b/lib/xstrdup.c
index 1182c592ac54f98e7965755b9959fbfdea610b1a..58f18beb6f9cb79818727a411e8037237170ca3f 100644
(file)
--- a/
lib/xstrdup.c
+++ b/
lib/xstrdup.c
@@
-29,5
+29,5
@@
char *
xstrdup (const char *string)
{
char *
xstrdup (const char *string)
{
- return
strcpy (xmalloc (strlen (string) + 1), string
);
+ return
xclone (string, strlen (string) + 1
);
}
}