diff options
author | brian <brian@FreeBSD.org> | 1998-09-22 18:39:47 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-09-22 18:39:47 +0000 |
commit | a642c78f623ae853fa3a3ce1fc3b765aad2a91f7 (patch) | |
tree | cac00ed7d3c8112556c831663aa8ef00ebbeb693 /usr.bin/sed | |
parent | a0a14e4798f18bb571cf208751ef12f331a8500b (diff) | |
download | FreeBSD-src-a642c78f623ae853fa3a3ce1fc3b765aad2a91f7.zip FreeBSD-src-a642c78f623ae853fa3a3ce1fc3b765aad2a91f7.tar.gz |
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.
This fixes exmh2/scripts/build when /etc/malloc.conf -> AJ
Diffstat (limited to 'usr.bin/sed')
-rw-r--r-- | usr.bin/sed/compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c index 04bac84..1c9b82b 100644 --- a/usr.bin/sed/compile.c +++ b/usr.bin/sed/compile.c @@ -40,7 +40,7 @@ static char sccsid[] = "@(#)compile.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id$"; + "$Id: compile.c,v 1.9 1997/08/11 07:20:58 charnier Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -652,6 +652,7 @@ compile_text() text = xmalloc(asize); } } + text[size] = '\0'; return (xrealloc(text, size + 1)); } |