-fix FIELDWIDTHS
This commit is contained in:
parent
8d4cb7ede3
commit
db044d431f
29
gawk-3.1.5-fieldwidths.patch
Normal file
29
gawk-3.1.5-fieldwidths.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
--- gawk-3.1.5/field.c.fieldwidths 2005-05-11 17:28:15.000000000 +0200
|
||||||
|
+++ gawk-3.1.5/field.c 2005-10-09 08:35:54.000000000 +0200
|
||||||
|
@@ -916,7 +916,7 @@
|
||||||
|
|
||||||
|
parse_field = fw_parse_field;
|
||||||
|
scan = force_string(FIELDWIDTHS_node->var_value)->stptr;
|
||||||
|
- end = scan + 1;
|
||||||
|
+
|
||||||
|
if (FIELDWIDTHS == NULL)
|
||||||
|
emalloc(FIELDWIDTHS, int *, fw_alloc * sizeof(int), "set_FIELDWIDTHS");
|
||||||
|
FIELDWIDTHS[0] = 0;
|
||||||
|
@@ -941,7 +941,7 @@
|
||||||
|
errno = 0;
|
||||||
|
tmp = strtoul(scan, &end, 10);
|
||||||
|
if (errno != 0
|
||||||
|
- || !(*end == '\0' || is_blank(*end))
|
||||||
|
+ || (*end != '\0' && ! is_blank(*end))
|
||||||
|
|| !(0 < tmp && tmp <= INT_MAX))
|
||||||
|
fatal(_("invalid FIELDWIDTHS value, near `%s'"),
|
||||||
|
scan);
|
||||||
|
@@ -954,7 +954,7 @@
|
||||||
|
if (*scan == '\0')
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
- FIELDWIDTHS[i] = -1;
|
||||||
|
+ FIELDWIDTHS[i+1] = -1;
|
||||||
|
|
||||||
|
update_PROCINFO("FS", "FIELDWIDTHS");
|
||||||
|
}
|
13
gawk.spec
13
gawk.spec
@ -1,17 +1,19 @@
|
|||||||
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: 3
|
Release: 4
|
||||||
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
|
||||||
Source1: ftp://ftp.gnu.org/gnu/gawk/gawk-%{version}-ps.tar.gz
|
Source1: ftp://ftp.gnu.org/gnu/gawk/gawk-%{version}-ps.tar.gz
|
||||||
Patch1: gawk-3.1.3-getpgrp_void.patch
|
|
||||||
Patch2: gawk-3.1.5-free.patch
|
|
||||||
Prereq: /sbin/install-info
|
Prereq: /sbin/install-info
|
||||||
Requires: /bin/mktemp
|
Requires: /bin/mktemp
|
||||||
Buildroot: %{_tmppath}/%{name}-root
|
Buildroot: %{_tmppath}/%{name}-root
|
||||||
|
|
||||||
|
Patch1: gawk-3.1.3-getpgrp_void.patch
|
||||||
|
Patch2: gawk-3.1.5-free.patch
|
||||||
|
Patch3: gawk-3.1.5-fieldwidths.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
|
||||||
utility. Awk interprets a special-purpose programming language to do
|
utility. Awk interprets a special-purpose programming language to do
|
||||||
@ -24,6 +26,7 @@ considered to be a standard Linux tool for processing text.
|
|||||||
%setup -q -b 1
|
%setup -q -b 1
|
||||||
%patch1 -p1 -b .getpgrp_void
|
%patch1 -p1 -b .getpgrp_void
|
||||||
%patch2 -p1 -b .free
|
%patch2 -p1 -b .free
|
||||||
|
%patch3 -p1 -b .fieldwidths
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
@ -72,6 +75,10 @@ fi
|
|||||||
%{_datadir}/awk
|
%{_datadir}/awk
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Oct 9 2005 Karel Zak <kzak@redhat.com> 3.1.5-4
|
||||||
|
- fix off-by-one error in assignment of sentinel value at
|
||||||
|
end of FIELDWIDTHS array. (patch by - upstream - Aharon Robbins)
|
||||||
|
|
||||||
* Tue Sep 27 2005 Karel Zak <kzak@redhat.com> 3.1.5-3
|
* Tue Sep 27 2005 Karel Zak <kzak@redhat.com> 3.1.5-3
|
||||||
- fix #169374 - Invalid Free (patch by Aharon Robbins)
|
- fix #169374 - Invalid Free (patch by Aharon Robbins)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user