diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-03 15:38:20 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-03 15:38:20 +0000 |
commit | 47d744b59da83744623bea39c006eb7e2ec02de9 (patch) | |
tree | 17d9ec1526a37c793ee3d7cbd031091d1867dd7f /util.c | |
parent | e59b5d6b8a963263b0c2dcf163e07b4318737d71 (diff) |
More rewrite of prohibited APIs (sprintf, strcpy, strcat).
svn path=/trunk/; revision=24258
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -75,14 +75,14 @@ get_args_as_string(int argc, char **argv, int optind) /* * Now construct the string. */ - strcpy(argstring, ""); + argstring[0] = '\0'; i = optind; for (;;) { - strcat(argstring, argv[i]); + strncat(argstring, argv[i], len - strlen(argstring)); i++; if (i == argc) break; - strcat(argstring, " "); + strncat(argstring, " ", len - strlen(argstring)); } return argstring; } |