lib32-pcre 8.38

This commit is contained in:
AlmAck 2015-12-06 16:24:58 +01:00
parent 1e20565ed8
commit f8aa743ef5
2 changed files with 3 additions and 67 deletions

View File

@ -3,16 +3,16 @@
_pkgbasename=pcre
pkgname=lib32-$_pkgbasename
pkgver=8.37
pkgver=8.38
pkgrel=1
pkgdesc="A library that implements Perl 5-style regular expressions (32-bit)"
arch=('x86_64')
url="http://pcre.sourceforge.net"
license=('custom')
depends=('lib32-gcc-libs' $_pkgbasename=$pkgver)
makedepends=('gcc-multilib')
makedepends=('lib32-gcc-libs')
source=(ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${_pkgbasename}-${pkgver}.tar.bz2{,.sig})
md5sums=('ed91be292cb01d21bc7e526816c26981'
md5sums=('00aabbfe56d5a48b270f999b508c5ad2'
'SKIP')
validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel

View File

@ -1,64 +0,0 @@
From a05e11ff3a663c06e0a30dfa86aa7ed4544a6008 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Fri, 11 Apr 2014 13:41:13 +0200
Subject: [PATCH] Do not rely on wrapping signed integer while parseing
{min,max}
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed integer overflow is not defined in C language. GCC 4.9 bails
out here.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
pcre_compile.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/pcre_compile.c b/pcre_compile.c
index 8a5b723..ce65058 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -1586,11 +1586,15 @@ int max = -1;
/* Read the minimum value and do a paranoid check: a negative value indicates
an integer overflow. */
-while (IS_DIGIT(*p)) min = min * 10 + (int)(*p++ - CHAR_0);
-if (min < 0 || min > 65535)
+while (IS_DIGIT(*p))
{
- *errorcodeptr = ERR5;
- return p;
+ min = min * 10 + (int)(*p++ - CHAR_0);
+ if (min > 65535)
+ {
+ *errorcodeptr = ERR5;
+ while (*p != CHAR_RIGHT_CURLY_BRACKET) p++;
+ return p;
+ }
}
/* Read the maximum value if there is one, and again do a paranoid on its size.
@@ -1601,11 +1605,15 @@ if (*p == CHAR_RIGHT_CURLY_BRACKET) max = min; else
if (*(++p) != CHAR_RIGHT_CURLY_BRACKET)
{
max = 0;
- while(IS_DIGIT(*p)) max = max * 10 + (int)(*p++ - CHAR_0);
- if (max < 0 || max > 65535)
+ while(IS_DIGIT(*p))
{
- *errorcodeptr = ERR5;
- return p;
+ max = max * 10 + (int)(*p++ - CHAR_0);
+ if (max > 65535)
+ {
+ *errorcodeptr = ERR5;
+ while (*p != CHAR_RIGHT_CURLY_BRACKET) p++;
+ return p;
+ }
}
if (max < min)
{
--
1.9.0