aboutsummaryrefslogtreecommitdiff
path: root/libexec/xtend/user.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2002-03-18 07:14:59 +0000
committerWarner Losh <imp@FreeBSD.org>2002-03-18 07:14:59 +0000
commit79723020c0e5955099bfe3c5dffe28c1fc00071a (patch)
tree1a2d1f9864ad5c2711fcd10b444ec296a200d0db /libexec/xtend/user.c
parentd1a939c146f83eb08f85b9e3b9a734388051dcdc (diff)
Notes
Diffstat (limited to 'libexec/xtend/user.c')
-rw-r--r--libexec/xtend/user.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libexec/xtend/user.c b/libexec/xtend/user.c
index 1200dd9f8da4..e10445ef1c3a 100644
--- a/libexec/xtend/user.c
+++ b/libexec/xtend/user.c
@@ -59,7 +59,7 @@ user_command(void)
char h;
char *m;
int i, k, n, error;
- char cmd[512], dumppath[MAXPATHLEN+1], pkt[3];
+ char cmd[512], dumppath[MAXPATHLEN], pkt[3];
FILE *dumpf;
error = 0;
@@ -89,9 +89,7 @@ user_command(void)
fprintf(User, "OK\n");
}
} else if(!strcmp("dump\n", cmd)) {
- strcpy(dumppath, X10DIR);
- strcat(dumppath, "/");
- strcat(dumppath, X10DUMPNAME);
+ snprintf(dumppath, sizeof(dumppath), "%s/%s" X10DIR, X10DUMPNAME);
if((dumpf = fopen(dumppath, "w")) != NULL) {
for(h = 0; h < 16; h++) {
for(i = 0; i < 16; i++) {