improve previous patch

This commit is contained in:
kzak 2007-01-12 12:05:05 +00:00
parent 3d4f4d39ec
commit 653a18c546
2 changed files with 23 additions and 8 deletions

View File

@ -1,5 +1,17 @@
--- gawk-3.1.5/field.c.freewstr 2007-01-12 12:48:50.000000000 +0100
+++ gawk-3.1.5/field.c 2007-01-12 12:50:27.000000000 +0100
@@ -211,6 +211,9 @@
n->stptr = cops;
unref(fields_arr[i]);
+ n->wstptr = NULL;
+ n->wstlen = 0;
+ n->flags &= ~WSTRCUR;
fields_arr[i] = n;
}
cops += fields_arr[i]->stlen + ofslen;
--- gawk-3.1.5/builtin.c.freewstr 2005-07-26 20:07:43.000000000 +0200
+++ gawk-3.1.5/builtin.c 2007-01-08 13:29:45.000000000 +0100
+++ gawk-3.1.5/builtin.c 2007-01-12 12:48:51.000000000 +0100
@@ -2089,9 +2089,9 @@
}
@ -30,7 +42,7 @@
if (mb_indices != NULL)
free(mb_indices);
--- gawk-3.1.5/awk.h.freewstr 2005-07-26 20:07:43.000000000 +0200
+++ gawk-3.1.5/awk.h 2007-01-08 12:31:26.000000000 +0100
+++ gawk-3.1.5/awk.h 2007-01-12 12:48:51.000000000 +0100
@@ -1166,6 +1166,9 @@
#define force_wstring(n) str2wstr(n, NULL)
extern const wchar_t *wstrstr P((const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len));
@ -41,8 +53,8 @@
#endif
/* re.c */
extern Regexp *make_regexp P((const char *s, size_t len, int ignorecase, int dfa));
--- gawk-3.1.5/node.c.freewstr 2007-01-08 12:31:26.000000000 +0100
+++ gawk-3.1.5/node.c 2007-01-08 12:41:48.000000000 +0100
--- gawk-3.1.5/node.c.freewstr 2007-01-12 12:48:50.000000000 +0100
+++ gawk-3.1.5/node.c 2007-01-12 12:48:51.000000000 +0100
@@ -218,15 +218,7 @@
no_malloc:
s->stref = 1;
@ -174,8 +186,8 @@
}
return NULL;
--- gawk-3.1.5/eval.c.freewstr 2007-01-08 12:31:26.000000000 +0100
+++ gawk-3.1.5/eval.c 2007-01-08 12:31:26.000000000 +0100
--- gawk-3.1.5/eval.c.freewstr 2007-01-12 12:48:50.000000000 +0100
+++ gawk-3.1.5/eval.c 2007-01-12 12:48:51.000000000 +0100
@@ -1176,13 +1176,7 @@
memcpy(l->stptr + l->stlen, r->stptr, r->stlen);
l->stlen += r->stlen;

View File

@ -1,7 +1,7 @@
Summary: The GNU version of the awk text processing utility.
Name: gawk
Version: 3.1.5
Release: 12%{dist}
Release: 13%{dist}
License: GPL
Group: Applications/Text
Source0: ftp://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.bz2
@ -29,7 +29,7 @@ Patch8: gawk-3.1.5-syntaxerror.patch
Patch9: gawk-3.1.5-numflags.patch
# IPv6 support
Patch10: gawk-3.1.5-ipv6.patch
# 222080: double free or corruption
# 222080 - double free or corruption
Patch11: gawk-3.1.5-freewstr.patch
%description
@ -101,6 +101,9 @@ fi
%{_datadir}/awk
%changelog
* Fri Jan 12 2007 Karel Zak <kzak@redhat.com> 3.1.5-13
- improve freewstr patch
* Thu Jan 11 2007 Karel Zak <kzak@redhat.com> 3.1.5-12
- fix #222080 double free or corruption