diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-07-31 02:48:15 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-07-31 02:48:15 +0000 |
commit | ac44eeda5fdbd4faba421aa941e43e7059022e5d (patch) | |
tree | c34152d3e8ddf7ff2e7c13c4a99afc24f485d9e5 /usr.bin/mail | |
parent | 4addf81b99a51150945ce75f6f8254af708cdff1 (diff) |
Another static buffer bytes the dust.
Diffstat (limited to 'usr.bin/mail')
-rw-r--r-- | usr.bin/mail/names.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/mail/names.c b/usr.bin/mail/names.c index 943c945834b..356b29b67c3 100644 --- a/usr.bin/mail/names.c +++ b/usr.bin/mail/names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: names.c,v 1.7 1997/07/24 17:27:12 millert Exp $ */ +/* $OpenBSD: names.c,v 1.8 1997/07/31 02:48:14 millert Exp $ */ /* $NetBSD: names.c,v 1.5 1996/06/08 19:48:32 christos Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)names.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: names.c,v 1.7 1997/07/24 17:27:12 millert Exp $"; +static char rcsid[] = "$OpenBSD: names.c,v 1.8 1997/07/31 02:48:14 millert Exp $"; #endif #endif /* not lint */ @@ -101,10 +101,12 @@ extract(line, ntype) { register char *cp; register struct name *top, *np, *t; - char nbuf[BUFSIZ]; + char *nbuf; if (line == NULL || *line == '\0') return(NIL); + if ((nbuf = (char *)malloc(strlen(line) + 1)) == NULL) + panic("Out of memory"); top = NIL; np = NIL; cp = line; @@ -117,6 +119,7 @@ extract(line, ntype) t->n_blink = np; np = t; } + (void)free(nbuf); return(top); } |