diff --git a/gawk-3.1.5-internal.patch b/gawk-3.1.5-internal.patch index 4177964..a049730 100644 --- a/gawk-3.1.5-internal.patch +++ b/gawk-3.1.5-internal.patch @@ -1,3 +1,23 @@ +Sun Jun 18 22:27:25 2006 Arnold D. Robbins + + Repair internal names like /dev/user, /dev/pid, as well as /dev/fd/N, + which have been broken for a long time but noone noticed. + + * io.c (is_internal): new macro to check for internal file like `/dev/user'. + (spec_setup): Reduce to two parameters, allocate logic is always true. + Add IOP_NO_FREE to flag. + (pidopen, useropen): Return `IOBUF *' instead of int. Fix + logic to test if `iop' parameter is NULL and if so to allocate it. + (specfdopen,): Return `IOBUF *' instead of int. Fix + logic to test if `iop' parameter is NULL and if so to allocate it. + Don't set IOP_NO_FREE in flag. + (iop_open): Remove `IOBUF iob' field from `struct internal' and its use + and the use of `spec_setup' from the code here. Change the check in the + call to the open function to look for NULL. + (get_a_record): Use `is_internal' in initial check for filling the + buffer to not try to call `read' on internal files. If true, set + the IOP_AT_EOF in the flag and return EOF. + --- gawk-3.1.5/io.c.internal 2006-06-21 19:46:59.000000000 +0200 +++ gawk-3.1.5/io.c 2006-06-21 19:49:54.000000000 +0200 @@ -110,6 +110,7 @@ diff --git a/gawk-3.1.5-syntaxerror.patch b/gawk-3.1.5-syntaxerror.patch new file mode 100644 index 0000000..34742f0 --- /dev/null +++ b/gawk-3.1.5-syntaxerror.patch @@ -0,0 +1,17 @@ +Fri Jun 23 15:48:34 2006 Arnold D. Robbins + + * awkgram.y (subn): At end for `do_sprintf' check, verify that lnode is not NULL + before using it assign through. + +--- gawk-3.1.5/awkgram.y.syntaxerror 2005-07-26 20:07:43.000000000 +0200 ++++ gawk-3.1.5/awkgram.y 2006-06-23 17:43:55.000000000 +0200 +@@ -2399,7 +2399,8 @@ + r->subnode = subn; + if (r->builtin == do_sprintf) { + count_args(r); +- r->lnode->printf_count = r->printf_count; /* hack */ ++ if (r->lnode != NULL) /* r->lnode set from subn. guard against syntax errors & check it's valid */ ++ r->lnode->printf_count = r->printf_count; /* hack */ + } + return r; + } diff --git a/gawk.spec b/gawk.spec index dbb5071..0bc9f9f 100644 --- a/gawk.spec +++ b/gawk.spec @@ -1,7 +1,7 @@ Summary: The GNU version of the awk text processing utility. Name: gawk Version: 3.1.5 -Release: 7 +Release: 8 License: GPL Group: Applications/Text Source0: ftp://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.bz2 @@ -16,7 +16,10 @@ Patch3: gawk-3.1.5-fieldwidths.patch Patch4: gawk-3.1.5-binmode.patch Patch5: gawk-3.1.5-num2str.patch Patch6: gawk-3.1.5-wconcat.patch +# fix internal names like /dev/user, /dev/pid, as well as /dev/fd/N Patch7: gawk-3.1.5-internal.patch +# 194214 - gawk coredumps on syntax error +Patch8: gawk-3.1.5-syntaxerror.patch %description The gawk packages contains the GNU version of awk, a text processing @@ -35,6 +38,7 @@ considered to be a standard Linux tool for processing text. %patch5 -p1 -b .num2str %patch6 -p1 -b .wconcat %patch7 -p1 -b .internal +%patch8 -p1 -b .syntaxerror %build %configure @@ -83,6 +87,9 @@ fi %{_datadir}/awk %changelog +* Fri Jun 23 2006 Karel Zak 3.1.5-8 +- fix #194214 - gawk coredumps on syntax error (patch by Aharon Robbins) + * Wed Jun 21 2006 Karel Zak 3.1.5-7 - fix internal names like /dev/user, /dev/pid, or /dev/fd/N (patch by Aharon Robbins)