summaryrefslogtreecommitdiff
path: root/usr.bin/awk/lib.c.diff
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2006-09-15 13:33:32 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2006-09-15 13:33:32 +0000
commit8a706197126f71037766d6080740398b03cabdc6 (patch)
tree86fe843be0cf985186804740136342062512cd02 /usr.bin/awk/lib.c.diff
parent1007c98db6071bfe63ff94345202c5d3e56f6d1a (diff)
Notes
Diffstat (limited to 'usr.bin/awk/lib.c.diff')
-rw-r--r--usr.bin/awk/lib.c.diff18
1 files changed, 18 insertions, 0 deletions
diff --git a/usr.bin/awk/lib.c.diff b/usr.bin/awk/lib.c.diff
new file mode 100644
index 000000000000..040485a64131
--- /dev/null
+++ b/usr.bin/awk/lib.c.diff
@@ -0,0 +1,18 @@
+$FreeBSD$
+
+Index: lib.c
+===================================================================
+RCS file: /home/ncvs/src/contrib/one-true-awk/lib.c,v
+retrieving revision 1.1.1.4
+diff -u -p -r1.1.1.4 lib.c
+--- lib.c 16 May 2005 19:11:33 -0000 1.1.1.4
++++ lib.c 15 Sep 2006 10:10:59 -0000
+@@ -58,7 +58,7 @@ static Cell dollar1 = { OCELL, CFLD, NUL
+ void recinit(unsigned int n)
+ {
+ if ( (record = (char *) malloc(n)) == NULL
+- || (fields = (char *) malloc(n)) == NULL
++ || (fields = (char *) malloc(n+1)) == NULL
+ || (fldtab = (Cell **) malloc((nfields+1) * sizeof(Cell *))) == NULL
+ || (fldtab[0] = (Cell *) malloc(sizeof(Cell))) == NULL )
+ FATAL("out of space for $0 and fields");