pcre was removed due to minimization efforts prior to public launch
This commit is contained in:
parent
07b3c4c111
commit
8bb4aacd20
40
.gitignore
vendored
40
.gitignore
vendored
@ -1,40 +0,0 @@
|
||||
pcre-8.10.tar.bz2
|
||||
/pcre-8.11.tar.bz2
|
||||
/pcre-8.12.tar.bz2
|
||||
/pcre-8.13.tar.bz2
|
||||
/pcre-8.20-RC1.tar.bz2
|
||||
/pcre-8.20-RC2.tar.bz2
|
||||
/pcre-8.20-RC3.tar.bz2
|
||||
/pcre-8.20.tar.bz2
|
||||
/pcre-8.21-RC1.tar.bz2
|
||||
/pcre-8.21.tar.bz2
|
||||
/pcre-8.30.tar.bz2
|
||||
/pcre-8.31-RC1.tar.bz2
|
||||
/pcre-8.31.tar.bz2
|
||||
/pcre-8.32-RC1.tar.bz2
|
||||
/pcre-8.32.tar.bz2
|
||||
/pcre-8.33-RC1.tar.bz2
|
||||
/pcre-8.33.tar.bz2
|
||||
/pcre-8.34.tar.bz2
|
||||
/pcre-8.35-RC1.tar.bz2
|
||||
/pcre-8.35.tar.bz2
|
||||
/pcre-8.36-RC1.tar.bz2
|
||||
/pcre-8.36.tar.bz2
|
||||
/pcre-8.37-RC1.tar.bz2
|
||||
/pcre-8.37.tar.bz2
|
||||
/pcre-8.38-RC1.tar.bz2
|
||||
/pcre-8.38.tar.bz2
|
||||
/pcre-8.39-RC1.tar.bz2
|
||||
/pcre-8.39.tar.bz2
|
||||
/pcre-8.40-RC1.tar.bz2
|
||||
/pcre-8.40.tar.bz2
|
||||
/pcre-8.41-RC1.tar.bz2
|
||||
/pcre-8.41.tar.bz2
|
||||
/pcre-8.42-RC1.tar.bz2
|
||||
/pcre-8.42.tar.bz2
|
||||
/pcre-8.43-RC1.tar.bz2
|
||||
/pcre-8.43.tar.bz2
|
||||
/pcre-8.44.tar.bz2
|
||||
/pcre-8.44.tar.bz2.sig
|
||||
/pcre-8.45.tar.bz2
|
||||
/pcre-8.45.tar.bz2.sig
|
39
Public-Key
39
Public-Key
@ -1,39 +0,0 @@
|
||||
This is Philip Hazel's public GPG key.
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.2.0 (SunOS)
|
||||
|
||||
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
|
||||
nmq1bbjAU4QVuIS9nkk2GrGx5+N6cYMy8JqG
|
||||
=EHsz
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
@ -1,6 +0,0 @@
|
||||
srpm pcre
|
||||
mcd $BUILDDIR/t-pcre
|
||||
$SRC/pcre-*/configure $TCONFIGARGS
|
||||
make $J V=1
|
||||
make $J install DESTDIR=${ROOTFS}
|
||||
fix_la pcre
|
1
dead.package
Normal file
1
dead.package
Normal file
@ -0,0 +1 @@
|
||||
pcre was removed due to minimization efforts prior to public launch
|
@ -1,37 +0,0 @@
|
||||
From 1d5ce3e2e6341b01609aefab20786a8638fee17a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Tue, 6 Dec 2011 18:44:11 +0100
|
||||
Subject: [PATCH] Fix multilib
|
||||
|
||||
Do not set RPATH nor add explicit -L path to compiler.
|
||||
---
|
||||
pcre-config.in | 12 ------------
|
||||
1 files changed, 0 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/pcre-config.in b/pcre-config.in
|
||||
index ccbf210..aeee182 100644
|
||||
--- a/pcre-config.in
|
||||
+++ b/pcre-config.in
|
||||
@@ -16,19 +16,7 @@ if test $# -eq 0; then
|
||||
fi
|
||||
|
||||
libR=
|
||||
-case `uname -s` in
|
||||
- *SunOS*)
|
||||
- libR=" -R@libdir@"
|
||||
- ;;
|
||||
- *BSD*)
|
||||
- libR=" -Wl,-R@libdir@"
|
||||
- ;;
|
||||
-esac
|
||||
-
|
||||
libS=
|
||||
-if test @libdir@ != /usr/lib ; then
|
||||
- libS=-L@libdir@
|
||||
-fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--
|
||||
1.7.7.4
|
||||
|
@ -1,48 +0,0 @@
|
||||
From 6f8b68f2740f3100154342338ed3d26e676dae69 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Mon, 7 Feb 2011 11:37:09 +0100
|
||||
Subject: [PATCH] Fix spelling in pcretest(1) manual
|
||||
|
||||
I kept some non-dictionary words to be consistent.
|
||||
Credits to John Bradshaw.
|
||||
|
||||
Spelling refused by upstream <http://bugs.exim.org/show_bug.cgi?id=1081#c3>:
|
||||
|
||||
I have applied these patches, except for "termi-nated", because my
|
||||
Collins dictionary of spelling and word division shows "termin-ate" and
|
||||
"termin-ating". I do know that there is a cultural difference between
|
||||
British and American hyphenation conventions; I try to follow the
|
||||
British ones, as exemplified in the Collins.
|
||||
---
|
||||
doc/pcretest.1 | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/doc/pcretest.1 b/doc/pcretest.1
|
||||
index 41ef6ac..258a62f 100644
|
||||
--- a/doc/pcretest.1
|
||||
+++ b/doc/pcretest.1
|
||||
@@ -601,8 +601,8 @@ recognized:
|
||||
after a successful match (number less than 32)
|
||||
.\" JOIN
|
||||
\eCname call pcre[16|32]_copy_named_substring() for substring
|
||||
- "name" after a successful match (name termin-
|
||||
- ated by next non alphanumeric character)
|
||||
+ "name" after a successful match (name terminated
|
||||
+ by next non alphanumeric character)
|
||||
.\" JOIN
|
||||
\eC+ show the current captured substrings at callout
|
||||
time
|
||||
@@ -623,8 +623,8 @@ recognized:
|
||||
after a successful match (number less than 32)
|
||||
.\" JOIN
|
||||
\eGname call pcre[16|32]_get_named_substring() for substring
|
||||
- "name" after a successful match (name termin-
|
||||
- ated by next non-alphanumeric character)
|
||||
+ "name" after a successful match (name terminated
|
||||
+ by next non-alphanumeric character)
|
||||
.\" JOIN
|
||||
\eJdd set up a JIT stack of dd kilobytes maximum (any
|
||||
number of digits)
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -1,24 +0,0 @@
|
||||
Fix recursion stack estimator
|
||||
|
||||
Due to inlining match() by recent GCC, the stack estimator reported 4-bytes
|
||||
stack consumption.
|
||||
|
||||
Author: Sergei Golubchik <vuvova@gmail.com>
|
||||
<https://bugs.exim.org/show_bug.cgi?id=2173>
|
||||
|
||||
diff --git a/pcre/pcre_exec.c b/pcre/pcre_exec.c
|
||||
--- a/pcre/pcre_exec.c
|
||||
+++ b/pcre/pcre_exec.c
|
||||
@@ -509,6 +509,12 @@
|
||||
(e.g. stopped by repeated call or recursion limit)
|
||||
*/
|
||||
|
||||
+#ifdef __GNUC__
|
||||
+static int
|
||||
+match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
|
||||
+ PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
|
||||
+ unsigned int rdepth) __attribute__((noinline,noclone));
|
||||
+#endif
|
||||
static int
|
||||
match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
|
||||
PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
|
@ -1,161 +0,0 @@
|
||||
From f1e9a32ee7fad2263636a51536ce0f9f13f09949 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Wed, 23 Jan 2019 10:16:20 +0100
|
||||
Subject: [PATCH] Declare POSIX regex function names as macros to PCRE
|
||||
functions
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
POSIX regex libraries differ in regex_t size. If a program includes
|
||||
<pcreposix.h>, but is not linked to pcreposix library at run-time
|
||||
(either in effect of --as-needed or a lazy binding in dlopen)
|
||||
other implementation touches memory out of the structure and the
|
||||
program can crash.
|
||||
|
||||
That means once a program includes <pcreposix.h>, it must link to the
|
||||
pcreposix library.
|
||||
|
||||
This patch replaces the POSIX regex declaration with macros to the
|
||||
PCRE uniqely-named function. This ensures that the PCRE's regex_t
|
||||
structure is always handled by the PCRE functions.
|
||||
|
||||
This patch still preserves the POSIX regex definitions in order to
|
||||
preseve ABI with application compiled before this change. The
|
||||
definition can be removed in the future.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
pcreposix.c | 50 +++++++++++++++++++++++++++++++++++++++++++++-----
|
||||
pcreposix.h | 20 ++++++++++++++------
|
||||
2 files changed, 59 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/pcreposix.c b/pcreposix.c
|
||||
index a76d6bf..3f2f3ef 100644
|
||||
--- a/pcreposix.c
|
||||
+++ b/pcreposix.c
|
||||
@@ -39,7 +39,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
/* This module is a wrapper that provides a POSIX API to the underlying PCRE
|
||||
-functions. */
|
||||
+functions. The operative functions are called pcre_regcomp(), etc., with
|
||||
+wrappers that use the plain POSIX names. This makes it easier for an
|
||||
+application to be sure it gets the PCRE versions in the presence of other
|
||||
+POSIX regex libraries. */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -204,12 +207,49 @@ static const char *const pstring[] = {
|
||||
|
||||
|
||||
/*************************************************
|
||||
-* Translate error code to string *
|
||||
+* Wrappers with traditional POSIX names *
|
||||
*************************************************/
|
||||
|
||||
+/* Keep defining them to preseve ABI with application linked to pcreposix
|
||||
+ * library before they were changed into macros. */
|
||||
+
|
||||
+#undef regerror
|
||||
PCREPOSIX_EXP_DEFN size_t PCRE_CALL_CONVENTION
|
||||
regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
|
||||
{
|
||||
+return pcre_regerror(errcode, preg, errbuf, errbuf_size);
|
||||
+}
|
||||
+
|
||||
+#undef regfree
|
||||
+PCREPOSIX_EXP_DEFN void PCRE_CALL_CONVENTION
|
||||
+regfree(regex_t *preg)
|
||||
+{
|
||||
+pcre_regfree(preg);
|
||||
+}
|
||||
+
|
||||
+#undef regcomp
|
||||
+PCREPOSIX_EXP_DEFN int PCRE_CALL_CONVENTION
|
||||
+regcomp(regex_t *preg, const char *pattern, int cflags)
|
||||
+{
|
||||
+return pcre_regcomp(preg, pattern, cflags);
|
||||
+}
|
||||
+
|
||||
+#undef regexec
|
||||
+PCREPOSIX_EXP_DEFN int PCRE_CALL_CONVENTION
|
||||
+regexec(const regex_t *preg, const char *string, size_t nmatch,
|
||||
+ regmatch_t pmatch[], int eflags)
|
||||
+{
|
||||
+return pcre_regexec(preg, string, nmatch, pmatch, eflags);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*************************************************
|
||||
+* Translate error code to string *
|
||||
+*************************************************/
|
||||
+
|
||||
+PCREPOSIX_EXP_DEFN size_t PCRE_CALL_CONVENTION
|
||||
+pcre_regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
|
||||
+{
|
||||
const char *message, *addmessage;
|
||||
size_t length, addlength;
|
||||
|
||||
@@ -243,7 +283,7 @@ return length + addlength;
|
||||
*************************************************/
|
||||
|
||||
PCREPOSIX_EXP_DEFN void PCRE_CALL_CONVENTION
|
||||
-regfree(regex_t *preg)
|
||||
+pcre_regfree(regex_t *preg)
|
||||
{
|
||||
(PUBL(free))(preg->re_pcre);
|
||||
}
|
||||
@@ -266,7 +306,7 @@ Returns: 0 on success
|
||||
*/
|
||||
|
||||
PCREPOSIX_EXP_DEFN int PCRE_CALL_CONVENTION
|
||||
-regcomp(regex_t *preg, const char *pattern, int cflags)
|
||||
+pcre_regcomp(regex_t *preg, const char *pattern, int cflags)
|
||||
{
|
||||
const char *errorptr;
|
||||
int erroffset;
|
||||
@@ -320,7 +360,7 @@ be set. When this is the case, the nmatch and pmatch arguments are ignored, and
|
||||
the only result is yes/no/error. */
|
||||
|
||||
PCREPOSIX_EXP_DEFN int PCRE_CALL_CONVENTION
|
||||
-regexec(const regex_t *preg, const char *string, size_t nmatch,
|
||||
+pcre_regexec(const regex_t *preg, const char *string, size_t nmatch,
|
||||
regmatch_t pmatch[], int eflags)
|
||||
{
|
||||
int rc, so, eo;
|
||||
diff --git a/pcreposix.h b/pcreposix.h
|
||||
index c77c0b0..6f108b8 100644
|
||||
--- a/pcreposix.h
|
||||
+++ b/pcreposix.h
|
||||
@@ -131,13 +131,21 @@ file. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-/* The functions */
|
||||
-
|
||||
-PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
|
||||
-PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
|
||||
+/* The functions. The actual code is in functions with pcre_xxx names for
|
||||
+uniqueness. POSIX names are provided for API compatibility with POSIX regex
|
||||
+functions. It's done this way to ensure to they are always get from the
|
||||
+PCRE library and not by accident from elsewhere. (regex_t differs in size
|
||||
+elsewhere.) */
|
||||
+
|
||||
+PCREPOSIX_EXP_DECL int pcre_regcomp(regex_t *, const char *, int);
|
||||
+#define regcomp pcre_regcomp
|
||||
+PCREPOSIX_EXP_DECL int pcre_regexec(const regex_t *, const char *, size_t,
|
||||
regmatch_t *, int);
|
||||
-PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
|
||||
-PCREPOSIX_EXP_DECL void regfree(regex_t *);
|
||||
+#define regexec pcre_regexec
|
||||
+PCREPOSIX_EXP_DECL size_t pcre_regerror(int, const regex_t *, char *, size_t);
|
||||
+#define regerror pcre_regerror
|
||||
+PCREPOSIX_EXP_DECL void pcre_regfree(regex_t *);
|
||||
+#define regfree pcre_regfree
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,44 +0,0 @@
|
||||
From f0bb9e8baf3157e0a84f484f194984295b2db23a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Mon, 19 Oct 2020 16:15:14 +0200
|
||||
Subject: [PATCH] Inicialize name table memory region
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Name table entry values are accessed past their ends in add_name()
|
||||
when comparing the values. Also a size of the entries could grow
|
||||
later. It's safer to initialize just after the allocation than to hunt
|
||||
the gaps later.
|
||||
|
||||
Reproducer:
|
||||
|
||||
pcre_compile2("(?<f>)(?<fir>)", PCRE_NO_AUTO_CAPTURE | PCRE_CASELESS, &ec, &eb, &eo, NULL);
|
||||
|
||||
built with clang++ -fsanitize=memory -fsanitize=fuzzer-no-link.
|
||||
|
||||
https://bugs.exim.org/show_bug.cgi?id=2661
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
pcre_compile.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/pcre_compile.c b/pcre_compile.c
|
||||
index 3be0fbf..75309e0 100644
|
||||
--- a/pcre_compile.c
|
||||
+++ b/pcre_compile.c
|
||||
@@ -9423,6 +9423,11 @@ if (re == NULL)
|
||||
goto PCRE_EARLY_ERROR_RETURN;
|
||||
}
|
||||
|
||||
+/* Initialize the memory. Name table entry values are accessed past their ends
|
||||
+ * (e.g. in add_name()) when comparing the values. Also a size of the entry can
|
||||
+ * grow later. It's safer to initialize here than to hunt the gaps later. */
|
||||
+memset(re, 0, size);
|
||||
+
|
||||
/* Put in the magic number, and save the sizes, initial options, internal
|
||||
flags, and character table pointer. NULL is used for the default character
|
||||
tables. The nullpad field is at the end; it's there to help in the case when a
|
||||
--
|
||||
2.25.4
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,98 +0,0 @@
|
||||
From 70fcff23652339438cabef86f2d3d9c645678687 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Sun, 20 Dec 2020 13:55:40 -0800
|
||||
Subject: [PATCH 2/2] Pass -mshstk to the compiler when Intel CET is enable
|
||||
|
||||
Copied from PCRE2.
|
||||
---
|
||||
CMakeLists.txt | 18 ++++++++++++++++++
|
||||
Makefile.am | 3 +++
|
||||
configure.ac | 15 +++++++++++++++
|
||||
3 files changed, 36 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 858a34b..74c27e9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -112,6 +112,24 @@ CHECK_FUNCTION_EXISTS(_strtoi64 HAVE__STRTOI64)
|
||||
CHECK_TYPE_SIZE("long long" LONG_LONG)
|
||||
CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG)
|
||||
|
||||
+# Check whether Intel CET is enabled, and if so, adjust compiler flags. This
|
||||
+# code was written by PH, trying to imitate the logic from the autotools
|
||||
+# configuration.
|
||||
+
|
||||
+CHECK_C_SOURCE_COMPILES(
|
||||
+ "#ifndef __CET__
|
||||
+ #error CET is not enabled
|
||||
+ #endif
|
||||
+ int main() { return 0; }"
|
||||
+ INTEL_CET_ENABLED
|
||||
+)
|
||||
+
|
||||
+IF (INTEL_CET_ENABLED)
|
||||
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mshstk")
|
||||
+ENDIF(INTEL_CET_ENABLED)
|
||||
+
|
||||
+
|
||||
+
|
||||
# User-configurable options
|
||||
#
|
||||
# (Note: CMakeSetup displays these in alphabetical order, regardless of
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 22b6947..984c686 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -250,6 +250,7 @@ libpcre_la_SOURCES = \
|
||||
|
||||
libpcre_la_CFLAGS = \
|
||||
$(VISIBILITY_CFLAGS) \
|
||||
+ $(CET_CFLAGS) \
|
||||
$(AM_CFLAGS)
|
||||
|
||||
libpcre_la_LIBADD =
|
||||
@@ -289,6 +290,7 @@ libpcre16_la_SOURCES = \
|
||||
|
||||
libpcre16_la_CFLAGS = \
|
||||
$(VISIBILITY_CFLAGS) \
|
||||
+ $(CET_CFLAGS) \
|
||||
$(AM_CFLAGS)
|
||||
|
||||
libpcre16_la_LIBADD =
|
||||
@@ -328,6 +330,7 @@ libpcre32_la_SOURCES = \
|
||||
|
||||
libpcre32_la_CFLAGS = \
|
||||
$(VISIBILITY_CFLAGS) \
|
||||
+ $(CET_CFLAGS) \
|
||||
$(AM_CFLAGS)
|
||||
|
||||
libpcre32_la_LIBADD =
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6a3e5f3..15f37d1 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1043,6 +1043,21 @@ fi # enable_coverage
|
||||
|
||||
AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"])
|
||||
|
||||
+AC_MSG_CHECKING([whether Intel CET is enabled])
|
||||
+AC_LANG_PUSH([C])
|
||||
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,
|
||||
+ [[#ifndef __CET__
|
||||
+# error CET is not enabled
|
||||
+#endif]])],
|
||||
+ [intel_cet_enabled=yes],
|
||||
+ [intel_cet_enabled=no])
|
||||
+AC_MSG_RESULT([$intel_cet_enabled])
|
||||
+if test "$intel_cet_enabled" = yes; then
|
||||
+ CET_CFLAGS="-mshstk"
|
||||
+ AC_SUBST([CET_CFLAGS])
|
||||
+fi
|
||||
+AC_LANG_POP([C])
|
||||
+
|
||||
# Produce these files, in addition to config.h.
|
||||
AC_CONFIG_FILES(
|
||||
Makefile
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,2 +0,0 @@
|
||||
from Config import *
|
||||
addFilter("spelling-error .* encodings");
|
2
sources
2
sources
@ -1,2 +0,0 @@
|
||||
SHA512 (pcre-8.45.tar.bz2) = 91bff52eed4a2dfc3f3bfdc9c672b88e7e2ffcf3c4b121540af8a4ae8c1ce05178430aa6b8000658b9bb7b4252239357250890e20ceb84b79cdfcde05154061a
|
||||
SHA512 (pcre-8.45.tar.bz2.sig) = 8dc7deb003f5454441f6b3f0c0d73bb1d1b32e518552fb80fb461c26ddddfcd68574549953e971e3f460b22f56dc6c65432dd67777adc90fb279501701e53f58
|
Loading…
Reference in New Issue
Block a user