diff options
author | 1998-09-22 21:21:43 +0000 | |
---|---|---|
committer | 1998-09-22 21:21:43 +0000 | |
commit | 4f3241261707af5caeab5873b19171ecaf10a49d (patch) | |
tree | 001cffb891efc82c593224ec4119ceded05483a1 /usr.bin/sed/compile.c | |
parent | Add mii layer for alpha (needed by new fxp) (diff) | |
download | wireguard-openbsd-4f3241261707af5caeab5873b19171ecaf10a49d.tar.xz wireguard-openbsd-4f3241261707af5caeab5873b19171ecaf10a49d.zip |
Terminate our output string correctly if we've got
an ``a'' command that has an escaped newline on the
last line of the last script that we're processing.
Diffstat (limited to 'usr.bin/sed/compile.c')
-rw-r--r-- | usr.bin/sed/compile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c index f4576fb346d..c5e4632ac56 100644 --- a/usr.bin/sed/compile.c +++ b/usr.bin/sed/compile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compile.c,v 1.7 1998/02/15 10:38:35 deraadt Exp $ */ +/* $OpenBSD: compile.c,v 1.8 1998/09/22 21:21:43 brian Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -39,7 +39,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)compile.c 8.1 (Berkeley) 6/6/93"; */ -static char *rcsid = "$OpenBSD: compile.c,v 1.7 1998/02/15 10:38:35 deraadt Exp $"; +static char *rcsid = "$OpenBSD: compile.c,v 1.8 1998/09/22 21:21:43 brian Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -644,6 +644,7 @@ compile_text() text = xmalloc(asize); } } + text[size] = '\0'; return (xrealloc(text, size + 1)); } |