Compare commits

...

20 Commits

Author SHA256 Message Date
Ana Guerrero
188dc2b9a5 Accepting request 1225909 from devel:libraries:c_c++
- update to 0.9.0:

OBS-URL: https://build.opensuse.org/request/show/1225909
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tre?expand=0&rev=18
2024-11-25 22:19:36 +00:00
Richard Brown
d58e91232b Accepting request 1009785 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/1009785
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tre?expand=0&rev=17
2022-10-11 15:59:15 +00:00
0d86640771 Accepting request 1009751 from home:favogt:branches:devel:libraries:c_c++
- Add patch to fix testsuite with bash >= 5.2:
  * 0001-Remove-broken-agrep-test-entry.patch

OBS-URL: https://build.opensuse.org/request/show/1009751
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=23
2022-10-11 12:39:37 +00:00
Dominique Leuenberger
7365a1a248 Accepting request 949534 from devel:libraries:c_c++
- require glibc-locale

OBS-URL: https://build.opensuse.org/request/show/949534
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tre?expand=0&rev=16
2022-01-29 19:57:26 +00:00
7766a2fadc OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=22 2022-01-27 20:25:39 +00:00
a8c912026b - require glibc-locale
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=21
2022-01-27 20:25:23 +00:00
Dominique Leuenberger
66519343c8 Accepting request 769489 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/769489
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tre?expand=0&rev=15
2020-02-03 10:27:14 +00:00
65f299c423 Accepting request 768750 from home:mimi_vx:branches:devel:libraries:c_c++
- remove python2 bindings

OBS-URL: https://build.opensuse.org/request/show/768750
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=19
2020-02-03 09:45:38 +00:00
Dominique Leuenberger
d889acf067 Accepting request 567305 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/567305
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tre?expand=0&rev=14
2018-01-19 10:54:05 +00:00
5918c9cc94 Accepting request 566471 from home:kbabioch:branches:devel:libraries:c_c++
- CVE-2016-8859.patch: Fix multiple integer overflows which allowed
  attackers to cause memory corruption via a large number of (1) states or
  (2) tags, which triggered an out-of-bounds write (bnc#1005483)

OBS-URL: https://build.opensuse.org/request/show/566471
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=17
2018-01-18 09:50:39 +00:00
Stephan Kulow
53e9c1c763 Accepting request 233045 from devel:libraries:c_c++
- Added chicken.patch to correct Python build failures
- Referenced a git pull request to justify the patch. (forwarded request 232982 from bjones)

OBS-URL: https://build.opensuse.org/request/show/233045
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tre?expand=0&rev=12
2014-05-09 04:59:12 +00:00
16ce85f704 Accepting request 232982 from home:bjones:branches:devel:libraries:c_c++
- Added chicken.patch to correct Python build failures
- Referenced a git pull request to justify the patch.

OBS-URL: https://build.opensuse.org/request/show/232982
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=15
2014-05-08 11:54:25 +00:00
b6a05af9b8 - remove redundant setting of C(XX)FLAGS
- package translations in tre-lang

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=14
2014-04-24 09:10:59 +00:00
8a4184e1e2 Accepting request 231198 from home:bjones:branches:devel:libraries:c_c++
- Fixes per Petr and Tomas
- Added make check tests
- Added python-tre wrapper
- Used updated source from https://github.com/laurikari/tre/

OBS-URL: https://build.opensuse.org/request/show/231198
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=13
2014-04-24 08:34:32 +00:00
Stephan Kulow
6680c98b28 Accepting request 116744 from devel:libraries:c_c++
- license update: BSD-3-Clause
  Package is predominantly BSD-3-Clause licensed. This spec file license
  update makes the openSUSE package license substantially similar to the
  Fedora package license"

OBS-URL: https://build.opensuse.org/request/show/116744
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tre?expand=0&rev=8
2012-05-08 16:02:06 +00:00
Ismail Dönmez
09b48748ad Cleanup
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=11
2012-05-08 12:49:36 +00:00
Ismail Dönmez
dea49826e6 Accepting request 116743 from home:babelworx:ldig:branches:devel:libraries:c_c++
license update: BSD-3-Clause
Package is predominantly BSD-3-Clause licensed. This spec file license update makes the openSUSE package license substantially similar to the Fedora package license"

OBS-URL: https://build.opensuse.org/request/show/116743
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=10
2012-05-08 12:49:24 +00:00
Stephan Kulow
a1d8305859 Accepting request 103179 from devel:libraries:c_c++
- Remove redundant tags/sections per specfile guideline suggestions
- Parallel building using %_smp_mflags
- Enable pkgconfig provides

OBS-URL: https://build.opensuse.org/request/show/103179
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tre?expand=0&rev=7
2012-02-08 16:21:03 +00:00
OBS User autobuild
5f7043c100 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tre?expand=0&rev=2 2010-03-18 15:32:55 +00:00
OBS User autobuild
fa667d528c Accepting request 28061 from devel:libraries:c_c++
Copy from devel:libraries:c_c++/tre based on submit request 28061 from user pgajdos

OBS-URL: https://build.opensuse.org/request/show/28061
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tre?expand=0&rev=1
2010-01-07 12:03:51 +00:00
5 changed files with 0 additions and 237 deletions

View File

@ -1,112 +0,0 @@
From 35f61f40d6b68928ca5d409fa9fc204ea77e2199 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Tue, 11 Oct 2022 11:35:53 +0200
Subject: [PATCH] Remove broken agrep test entry
It's meant to cause agrep to return with exit code 2, but asserts that it's
exit code 1 instead.
It's meant to ensure that using ".*" as pattern results in exit code 2 because
it matches also an empty string. However, glob expansion results in ".*"
picking up files such as "." and ".." from the CWD, which get interpreted as
valid pattern. This results in exit status 1 (no match found) which is what
the .ok file expects, but that's invalid.
With bash 5.2, glob expansion no longer matches "." and ".." by default, so
the test works as intended by accident, causing a mismatch with the expected
wrong exit code.
It's unfortunately not easily possible to avoid glob expansion in this case.
Just remove the test for now.
---
tests/agrep/exitstatus.args | 1 -
tests/agrep/exitstatus.ok | 61 -------------------------------------
2 files changed, 62 deletions(-)
diff --git a/tests/agrep/exitstatus.args b/tests/agrep/exitstatus.args
index 808ae77..2f53e97 100644
--- a/tests/agrep/exitstatus.args
+++ b/tests/agrep/exitstatus.args
@@ -5,6 +5,5 @@ this-wont-be-found
.
-v .
# Some errors which should give exit status 2.
--d .* dummy
-d {1 dummy
\
diff --git a/tests/agrep/exitstatus.ok b/tests/agrep/exitstatus.ok
index 28427bb..bd23b4c 100644
--- a/tests/agrep/exitstatus.ok
+++ b/tests/agrep/exitstatus.ok
@@ -521,67 +521,6 @@ Exit status 1.
Exit status 1.
#### TEST: agrep -H -n -s --color --show-position -v . < exitstatus.in
-Exit status 1.
-#### TEST: agrep -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -c -d .* dummy exitstatus.in
-exitstatus.in:0
-
-Exit status 1.
-#### TEST: agrep -c -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -H -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -H -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -l -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -l -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -n -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -n -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -s -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -s -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -M -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -M -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep --show-position -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep --show-position -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep --color -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep --color -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -H -n -s --color --show-position -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -H -n -s --color --show-position -d .* dummy < exitstatus.in
-
Exit status 1.
#### TEST: agrep -d {1 dummy exitstatus.in
--
2.36.1

View File

@ -1,73 +0,0 @@
From c3edc06d1e1360f3570db9155d6b318ae0d0f0f7 Mon Sep 17 00:00:00 2001
From: Rich Felker <dalias@aerifal.cx>
Date: Thu, 6 Oct 2016 18:34:58 -0400
Subject: fix missing integer overflow checks in regexec buffer size
computations
most of the possible overflows were already ruled out in practice by
regcomp having already succeeded performing larger allocations.
however at least the num_states*num_tags multiplication can clearly
overflow in practice. for safety, check them all, and use the proper
type, size_t, rather than int.
also improve comments, use calloc in place of malloc+memset, and
remove bogus casts.
---
src/regex/regexec.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
Note: patch was modified to apply to tre, parts were taken from
https://github.com/laurikari/tre/issues/37
--- a/lib/tre-match-parallel.c
+++ b/lib/tre-match-parallel.c
@@ -59,6 +59,7 @@ char *alloca ();
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif /* HAVE_MALLOC_H */
+#include <stdint.h>
#include "tre-internal.h"
#include "tre-match-utils.h"
@@ -150,11 +151,24 @@ tre_tnfa_run_parallel(const tre_tnfa_t *
/* Allocate memory for temporary data required for matching. This needs to
be done for every matching operation to be thread safe. This allocates
- everything in a single large block from the stack frame using alloca()
- or with malloc() if alloca is unavailable. */
+ everything in a single large block with calloc(). */
{
- int tbytes, rbytes, pbytes, xbytes, total_bytes;
+ size_t tbytes, rbytes, pbytes, xbytes, total_bytes;
char *tmp_buf;
+
+ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that
+ * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */
+ if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states))
+ return REG_BADPAT;
+
+ /* Likewise check rbytes. */
+ if (tnfa->num_states+1 > SIZE_MAX/(8 * sizeof(*reach_next)))
+ return REG_BADPAT;
+
+ /* Likewise check pbytes. */
+ if (tnfa->num_states > SIZE_MAX/(8 * sizeof(*reach_pos)))
+ return REG_BADPAT;
+
/* Compute the length of the block we need. */
tbytes = sizeof(*tmp_tags) * num_tags;
rbytes = sizeof(*reach_next) * (tnfa->num_states + 1);
@@ -168,11 +182,11 @@ tre_tnfa_run_parallel(const tre_tnfa_t *
#ifdef TRE_USE_ALLOCA
buf = alloca(total_bytes);
#else /* !TRE_USE_ALLOCA */
- buf = xmalloc((unsigned)total_bytes);
+ buf = xmalloc(total_bytes);
#endif /* !TRE_USE_ALLOCA */
if (buf == NULL)
return REG_ESPACE;
- memset(buf, 0, (size_t)total_bytes);
+ memset(buf, 0, total_bytes);
/* Get the various pointers within tmp_buf (properly aligned). */
tmp_tags = (void *)buf;

BIN
tre-0.8.0_git201402282055.tar.bz2 (Stored with Git LFS)

Binary file not shown.

View File

@ -1,21 +0,0 @@
diff -up tre-0.8.0/python/setup.py.in.chicken tre-0.8.0/python/setup.py.in
--- tre-0.8.0/python/setup.py.in.chicken 2009-09-20 09:51:01.000000000 +0200
+++ tre-0.8.0/python/setup.py.in 2009-09-20 15:43:45.000000000 +0200
@@ -10,7 +10,8 @@ import shutil
version = "@TRE_VERSION@"
data_files = []
-include_dirs = ["../lib"]
+include_dirs = ["../include"]
+library_dirs = ["../lib/.libs"]
libraries = ["tre"]
if sys.platform == "win32":
@@ -31,6 +32,7 @@ setup(name = "tre",
sources = ["tre-python.c"],
define_macros = [("HAVE_CONFIG_H", None)],
include_dirs = include_dirs,
+ library_dirs = library_dirs,
libraries = libraries
),
],

View File

@ -1,28 +0,0 @@
diff -ru tre-0.7.5/lib/tre-match-approx.c tre-0.7.5.new/lib/tre-match-approx.c
--- tre-0.7.5/lib/tre-match-approx.c 2006-12-08 19:07:03.000000000 +0000
+++ tre-0.7.5.new/lib/tre-match-approx.c 2008-01-24 19:47:12.000000000 +0000
@@ -23,24 +23,6 @@
#include <config.h>
#endif /* HAVE_CONFIG_H */
-/* AIX requires this to be the first thing in the file. */
-#ifdef TRE_USE_ALLOCA
-#ifndef __GNUC__
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-# endif
-# endif
-# endif
-#endif
-#endif /* TRE_USE_ALLOCA */
-
-#define __USE_STRING_INLINES
#undef __NO_INLINE__
#include <assert.h>