summaryrefslogtreecommitdiffstats
path: root/usr.bin/sed
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-09-22 18:39:47 +0000
committerbrian <brian@FreeBSD.org>1998-09-22 18:39:47 +0000
commita642c78f623ae853fa3a3ce1fc3b765aad2a91f7 (patch)
treecac00ed7d3c8112556c831663aa8ef00ebbeb693 /usr.bin/sed
parenta0a14e4798f18bb571cf208751ef12f331a8500b (diff)
downloadFreeBSD-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.c3
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));
}
OpenPOWER on IntegriCloud