diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-09-16 23:03:11 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-09-16 23:03:11 +0000 |
commit | ae78b02b5658b08941e7458e9d021e1a02c2561d (patch) | |
tree | 0aeff6ddfe9ccd073f720d52aaff5242e3485821 /usr.bin | |
parent | e6687407df724f864722874c9184063ea5ad307c (diff) |
Possible buf oflow, from Theo.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sup/src/expand.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/sup/src/expand.c b/usr.bin/sup/src/expand.c index dd5f2aa82d5..d27a11c034a 100644 --- a/usr.bin/sup/src/expand.c +++ b/usr.bin/sup/src/expand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expand.c,v 1.5 1997/09/16 11:13:59 deraadt Exp $ */ +/* $OpenBSD: expand.c,v 1.6 1997/09/16 23:03:10 millert Exp $ */ /* * Copyright (c) 1991 Carnegie Mellon University @@ -242,8 +242,8 @@ pend: doit: savec = *pm; *pm = 0; - strcpy(lm, pl); - strcat(restbuf, pe + 1); + snprintf(lm, sizeof(restbuf) - (lm - restbuf), + "%s%s", pl, pe + 1); *pm = savec; if (s == 0) { spathp = pathp; |