fix syntax error, core dump bug
This commit is contained in:
parent
b96b60afae
commit
9a938f25ff
@ -1,3 +1,23 @@
|
|||||||
|
Sun Jun 18 22:27:25 2006 Arnold D. Robbins <arnold@skeeve.com>
|
||||||
|
|
||||||
|
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.internal 2006-06-21 19:46:59.000000000 +0200
|
||||||
+++ gawk-3.1.5/io.c 2006-06-21 19:49:54.000000000 +0200
|
+++ gawk-3.1.5/io.c 2006-06-21 19:49:54.000000000 +0200
|
||||||
@@ -110,6 +110,7 @@
|
@@ -110,6 +110,7 @@
|
||||||
|
17
gawk-3.1.5-syntaxerror.patch
Normal file
17
gawk-3.1.5-syntaxerror.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Fri Jun 23 15:48:34 2006 Arnold D. Robbins <arnold@skeeve.com>
|
||||||
|
|
||||||
|
* 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;
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
Summary: The GNU version of the awk text processing utility.
|
Summary: The GNU version of the awk text processing utility.
|
||||||
Name: gawk
|
Name: gawk
|
||||||
Version: 3.1.5
|
Version: 3.1.5
|
||||||
Release: 7
|
Release: 8
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Applications/Text
|
Group: Applications/Text
|
||||||
Source0: ftp://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.bz2
|
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
|
Patch4: gawk-3.1.5-binmode.patch
|
||||||
Patch5: gawk-3.1.5-num2str.patch
|
Patch5: gawk-3.1.5-num2str.patch
|
||||||
Patch6: gawk-3.1.5-wconcat.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
|
Patch7: gawk-3.1.5-internal.patch
|
||||||
|
# 194214 - gawk coredumps on syntax error
|
||||||
|
Patch8: gawk-3.1.5-syntaxerror.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The gawk packages contains the GNU version of awk, a text processing
|
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
|
%patch5 -p1 -b .num2str
|
||||||
%patch6 -p1 -b .wconcat
|
%patch6 -p1 -b .wconcat
|
||||||
%patch7 -p1 -b .internal
|
%patch7 -p1 -b .internal
|
||||||
|
%patch8 -p1 -b .syntaxerror
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
@ -83,6 +87,9 @@ fi
|
|||||||
%{_datadir}/awk
|
%{_datadir}/awk
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 23 2006 Karel Zak <kzak@redhat.com> 3.1.5-8
|
||||||
|
- fix #194214 - gawk coredumps on syntax error (patch by Aharon Robbins)
|
||||||
|
|
||||||
* Wed Jun 21 2006 Karel Zak <kzak@redhat.com> 3.1.5-7
|
* Wed Jun 21 2006 Karel Zak <kzak@redhat.com> 3.1.5-7
|
||||||
- fix internal names like /dev/user, /dev/pid, or /dev/fd/N (patch by Aharon Robbins)
|
- fix internal names like /dev/user, /dev/pid, or /dev/fd/N (patch by Aharon Robbins)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user