Accepting request 99588 from Base:System
- added mawk-1.3.4-fix-regex-matching.patch which adds limit-check after processing match(test, "[^0-9A-Za-z]") to ensure the internal trailing null of the test-string is not mistaken for part of the string (backported from development snapshot, bnc#740484) - specfile cleanup OBS-URL: https://build.opensuse.org/request/show/99588 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mawk?expand=0&rev=8
This commit is contained in:
parent
2365ac5704
commit
15e6e8572f
49
mawk-1.3.4-fix-regex-matching.patch
Normal file
49
mawk-1.3.4-fix-regex-matching.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
diff -urNp mawk-1.3.4.orig/files.c mawk-1.3.4/files.c
|
||||||
|
--- mawk-1.3.4.orig/files.c 2009-12-17 01:06:51.000000000 +0100
|
||||||
|
+++ mawk-1.3.4/files.c 2012-01-09 22:07:45.667127645 +0100
|
||||||
|
@@ -506,7 +506,7 @@ remove_from_child_list(int pid)
|
||||||
|
int
|
||||||
|
wait_for(int pid)
|
||||||
|
{
|
||||||
|
- int exit_status;
|
||||||
|
+ int exit_status = 0;
|
||||||
|
struct child *p;
|
||||||
|
int id;
|
||||||
|
|
||||||
|
diff -urNp mawk-1.3.4.orig/fin.c mawk-1.3.4/fin.c
|
||||||
|
--- mawk-1.3.4.orig/fin.c 2009-12-17 01:06:57.000000000 +0100
|
||||||
|
+++ mawk-1.3.4/fin.c 2012-01-09 22:07:45.667127645 +0100
|
||||||
|
@@ -317,7 +317,7 @@ FINgets(FIN * fin, unsigned *len_p)
|
||||||
|
unsigned rr;
|
||||||
|
unsigned amount = (unsigned) (fin->limit - p);
|
||||||
|
|
||||||
|
- p = (char *) memcpy(fin->buff, p, r = (unsigned) (fin->limit - p));
|
||||||
|
+ p = (char *) memmove(fin->buff, p, r = (unsigned) (fin->limit - p));
|
||||||
|
q = p + r;
|
||||||
|
rr = fin->nbuffs * BUFFSZ - r;
|
||||||
|
|
||||||
|
diff -urNp mawk-1.3.4.orig/rexp3.c mawk-1.3.4/rexp3.c
|
||||||
|
--- mawk-1.3.4.orig/rexp3.c 2009-12-15 02:50:07.000000000 +0100
|
||||||
|
+++ mawk-1.3.4/rexp3.c 2012-01-09 22:07:45.668127668 +0100
|
||||||
|
@@ -149,7 +149,10 @@ REmatch(char *str, /* string to test */
|
||||||
|
goto reswitch;
|
||||||
|
|
||||||
|
case M_STR + U_ON + END_OFF:
|
||||||
|
- if (!(s = str_str(s, str_len, m->s_data.str, m->s_len))) {
|
||||||
|
+ if (s >= str_end) {
|
||||||
|
+ goto refill;
|
||||||
|
+ }
|
||||||
|
+ if (!(s = str_str(s, (unsigned) (str_end - s), m->s_data.str, m->s_len))) {
|
||||||
|
goto refill;
|
||||||
|
}
|
||||||
|
if (s >= str + strlen(str)) {
|
||||||
|
@@ -229,6 +232,9 @@ REmatch(char *str, /* string to test */
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ if (s >= str_end) {
|
||||||
|
+ goto refill;
|
||||||
|
+ }
|
||||||
|
s++;
|
||||||
|
push(m, s, ss, U_ON);
|
||||||
|
if (!ss) {
|
10
mawk.changes
10
mawk.changes
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 10 10:00:25 UTC 2012 - gber@opensuse.org
|
||||||
|
|
||||||
|
- added mawk-1.3.4-fix-regex-matching.patch which adds limit-check
|
||||||
|
after processing match(test, "[^0-9A-Za-z]") to ensure the
|
||||||
|
internal trailing null of the test-string is not mistaken for
|
||||||
|
part of the string (backported from development snapshot,
|
||||||
|
bnc#740484)
|
||||||
|
- specfile cleanup
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 22 19:13:57 UTC 2010 - guido+opensuse.org@berhoerster.name
|
Mon Feb 22 19:13:57 UTC 2010 - guido+opensuse.org@berhoerster.name
|
||||||
|
|
||||||
|
27
mawk.spec
27
mawk.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package mawk (Version 1.3.4)
|
# spec file for package mawk
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# Copyright (c) 2010 Guido Berhoerster.
|
# Copyright (c) 2010 Guido Berhoerster.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@ -16,20 +16,20 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Name: mawk
|
Name: mawk
|
||||||
Summary: Implementation of New/POSIX AWK
|
Summary: Implementation of New/POSIX AWK
|
||||||
Version: 1.3.4
|
|
||||||
Release: 1
|
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
Group: Productivity/Text/Utilities
|
Group: Productivity/Text/Utilities
|
||||||
|
Version: 1.3.4
|
||||||
|
Release: 0
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
AutoReqProv: on
|
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
Source: ftp://invisible-island.net/mawk/mawk-%{version}.tgz
|
Source: ftp://invisible-island.net/mawk/mawk-%{version}.tgz
|
||||||
|
# PATCH-FIX-UPSTREAM mawk-1.3.4-fix-make-check-path-handling.patch gber@opensuse.org -- Modifies makefile and mawktest to use relative paths
|
||||||
Patch0: mawk-1.3.4-fix-make-check-path-handling.patch
|
Patch0: mawk-1.3.4-fix-make-check-path-handling.patch
|
||||||
|
# PATCH-FIX-UPSTREAM mawk-1.3.4-fix-regex-matching.patch bnc#740484 gber@opensuse.org -- Adds limit-check after processing match(test, "[^0-9A-Za-z]") to ensure the internal trailing null of the test-string is not mistaken for part of the string
|
||||||
|
Patch1: mawk-1.3.4-fix-regex-matching.patch
|
||||||
Url: http://invisible-island.net/mawk/mawk.html
|
Url: http://invisible-island.net/mawk/mawk.html
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -40,16 +40,10 @@ Language, Addison-Wesley Publishing, 1988. Furthermore, it conforms to the
|
|||||||
POSIX 1003.2 (draft 11.3) definition of the AWK language and additionally
|
POSIX 1003.2 (draft 11.3) definition of the AWK language and additionally
|
||||||
provides a small number of extensions.
|
provides a small number of extensions.
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
|
||||||
--------
|
|
||||||
Thomas E. Dickey <dickey@invisible-island.net>
|
|
||||||
Mike Brennan
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# without --enable-warnings several functions will not be marked with gcc's
|
# without --enable-warnings several functions will not be marked with gcc's
|
||||||
@ -67,9 +61,6 @@ make %{?_smp_mflags}
|
|||||||
touch $RPM_BUILD_ROOT/bin/awk $RPM_BUILD_ROOT/usr/bin/awk \
|
touch $RPM_BUILD_ROOT/bin/awk $RPM_BUILD_ROOT/usr/bin/awk \
|
||||||
$RPM_BUILD_ROOT/%{_mandir}/man1/awk.1.gz
|
$RPM_BUILD_ROOT/%{_mandir}/man1/awk.1.gz
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check
|
make check
|
||||||
|
|
||||||
@ -87,11 +78,9 @@ fi
|
|||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc CHANGES README ACKNOWLEDGMENT examples/
|
%doc CHANGES README ACKNOWLEDGMENT examples/
|
||||||
%doc %{_mandir}/man1/mawk.1*
|
%doc %{_mandir}/man1/mawk.1*
|
||||||
%if %{suse_version} >= 1120
|
|
||||||
%ghost /bin/awk
|
%ghost /bin/awk
|
||||||
%ghost %{_bindir}/awk
|
%ghost %{_bindir}/awk
|
||||||
%ghost %{_mandir}/man1/awk.1.gz
|
%ghost %{_mandir}/man1/awk.1.gz
|
||||||
%endif
|
|
||||||
/usr/bin/mawk
|
/usr/bin/mawk
|
||||||
/bin/mawk
|
/bin/mawk
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user