Compare commits

...

3 Commits
rawhide ... f14

Author SHA1 Message Date
Vojtech Vitek (V-Teq) ed4af000fb - add byacc to BuildRequires
- follow updated libsigsegv option in configure script
2010-11-02 16:05:02 +01:00
Vojtech Vitek (V-Teq) fee9238e54 - fix syntax issues #528623, #528625 2010-11-02 14:56:42 +01:00
Vojtech Vitek (V-Teq) 9e15fef9c6 - fix #629196: Double free in free_wstr
- fix license tag, add description
- remove BuildRoot tag
2010-11-02 11:42:54 +01:00
3 changed files with 68 additions and 4 deletions

View File

@ -0,0 +1,23 @@
Index: node.c
===================================================================
RCS file: /sources/gawk/gawk-devel/node.c,v
retrieving revision 1.3
diff -u -r1.3 node.c
--- node.c 6 May 2010 19:00:58 -0000 1.3
+++ node.c 27 Oct 2010 17:56:49 -0000
@@ -758,6 +758,15 @@
assert((n->flags & (STRING|STRCUR)) != 0);
+ /*
+ * Don't convert global null string or global null field
+ * variables to a wide string. They are both zero-length anyway.
+ * This also avoids future double-free errors while releasing
+ * shallow copies, eg. *tmp = *Null_field; free_wstr(tmp);
+ */
+ if (n == Nnull_string || n == Null_field)
+ return n;
+
if ((n->flags & WSTRCUR) != 0) {
if (ptr == NULL)
return n;

22
gawk-3.1.8-syntax.patch Normal file
View File

@ -0,0 +1,22 @@
--- gawk-3.1.7/awkgram.y.orig 2010-06-25 10:08:11.000000000 +0200
+++ gawk-3.1.7/awkgram.y 2010-06-25 10:10:34.000000000 +0200
@@ -164,7 +164,7 @@
%nonassoc LEX_IN
%left FUNC_CALL LEX_BUILTIN LEX_LENGTH
%nonassoc ','
-%nonassoc MATCHOP
+%left MATCHOP
%nonassoc RELOP '<' '>' IO_IN IO_OUT
%left CONCAT_OP
%left YSTRING YNUMBER
@@ -702,8 +702,8 @@
*/
print_expression_list
: opt_expression_list
- | '(' exp comma expression_list r_paren
- { $$ = node($2, Node_expression_list, $4); }
+ | '(' expression_list r_paren
+ { $$ = $2; }
;
output_redir

View File

@ -1,15 +1,22 @@
Summary: The GNU version of the awk text processing utility
Name: gawk
Version: 3.1.8
Release: 1%{?dist}
License: GPLv3+
Release: 3%{?dist}
# Most of source files are licensed under GPLv3+,
# several files are GPL or LGPLv2.1+ licensed,
# gettext.h is LGPL and random.c is BSD licensed
License: GPLv3+ and GPL and LGPLv3+ and LGPL and BSD
Group: Applications/Text
URL: http://www.gnu.org/software/gawk/gawk.html
Source0: http://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.bz2
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
# Patch from Arnold, the upstream maintainer:
Patch0: gawk-3.1.8-syntax.patch
# http://lists.gnu.org/archive/html/bug-gnu-utils/2010-11/msg00005.html
Patch1: gawk-3.1.8-double-free-wstptr.patch
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
BuildRequires: byacc
%description
The gawk package contains the GNU version of awk, a text processing
@ -21,9 +28,11 @@ considered to be a standard Linux tool for processing text.
%prep
%setup -q
%patch0 -p1 -b .syntax
%patch1 -p0 -b .double-free-wstptr
%build
%configure --bindir=/bin --disable-libsigsegv
%configure --bindir=/bin --with-libsigsegv-prefix=no
make %{?_smp_mflags}
%check
@ -69,6 +78,16 @@ fi
%{_datadir}/awk
%changelog
* Tue Nov 02 2010 Vojtech Vitek (V-Teq) <vvitek@redhat.com> - 3.1.8-3
- fix syntax issues #528623, #528625
- add byacc to BuildRequires
- follow updated libsigsegv option in configure script
* Tue Nov 02 2010 Vojtech Vitek (V-Teq) <vvitek@redhat.com> - 3.1.8-2
- fix #629196: Double free in free_wstr
- fix license tag, add description
- remove BuildRoot tag
* Fri May 7 2010 Stepan Kasal <kasal@ucw.cz> - 3.1.8-1
- new upstream version
- drop upstreamed patches