summaryrefslogtreecommitdiff
path: root/usr.bin/rdist
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-08-13 03:29:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-08-13 03:29:10 +0000
commitdc966be31bfb5ebe5f895ed0e3e05d2f7a6decbf (patch)
treef40dbdad847e2bc83196cfc7b184267e7c9582a6 /usr.bin/rdist
parent35028371618bb138af7975f0c640f5e7943fcbaf (diff)
buf oflow; spotted by jmcdonal@UNF.EDU
Diffstat (limited to 'usr.bin/rdist')
-rw-r--r--usr.bin/rdist/expand.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/rdist/expand.c b/usr.bin/rdist/expand.c
index c8b469731bd..b102be70c3d 100644
--- a/usr.bin/rdist/expand.c
+++ b/usr.bin/rdist/expand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expand.c,v 1.5 1998/06/26 21:21:10 millert Exp $ */
+/* $OpenBSD: expand.c,v 1.6 1998/08/13 03:29:09 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -39,7 +39,7 @@ static char RCSid[] =
"$From: expand.c,v 6.18 1998/03/24 00:37:10 michaelc Exp $";
#else
static char RCSid[] =
-"$OpenBSD: expand.c,v 1.5 1998/06/26 21:21:10 millert Exp $";
+"$OpenBSD: expand.c,v 1.6 1998/08/13 03:29:09 deraadt Exp $";
#endif
static char sccsid[] = "@(#)expand.c 5.2 (Berkeley) 3/28/86";
@@ -261,13 +261,13 @@ void expstr(s)
*tail = savec;
if (tp != NULL) {
for (; tp != NULL; tp = tp->n_next) {
- (void) sprintf((char *)ebuf,
- "%s%s%s", s, tp->n_name, tail);
+ (void) snprintf((char *)ebuf, sizeof ebuf,
+ "%s%s%s", s, tp->n_name, tail);
expstr(ebuf);
}
return;
}
- (void) sprintf((char *)ebuf, "%s%s", s, tail);
+ (void) snprintf((char *)ebuf, sizeof ebuf, "%s%s", s, tail);
expstr(ebuf);
return;
}