From: @xujing99 Reviewed-by: @openeuler-basic Signed-off-by: @openeuler-basic
This commit is contained in:
commit
2124205d67
@ -0,0 +1,24 @@
|
||||
From d231944236c6516de2831cbdde3069dab180ae81 Mon Sep 17 00:00:00 2001
|
||||
From: pkuzco <b.naamneh@gmail.com>
|
||||
Date: Mon, 9 Oct 2023 17:46:42 +0200
|
||||
Subject: [PATCH] fix a possible integer overflow in DFA matching (#305)
|
||||
|
||||
---
|
||||
src/pcre2_dfa_match.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pcre2_dfa_match.c b/src/pcre2_dfa_match.c
|
||||
index 518ac07..13b1ae4 100644
|
||||
--- a/src/pcre2_dfa_match.c
|
||||
+++ b/src/pcre2_dfa_match.c
|
||||
@@ -428,7 +428,7 @@ overflow. */
|
||||
|
||||
else
|
||||
{
|
||||
- uint32_t newsize = (rws->size >= UINT32_MAX/2)? UINT32_MAX/2 : rws->size * 2;
|
||||
+ uint32_t newsize = (rws->size >= UINT32_MAX/(sizeof(int)*2))? UINT32_MAX/sizeof(int) : rws->size * 2;
|
||||
uint32_t newsizeK = newsize/(1024/sizeof(int));
|
||||
|
||||
if (newsizeK + mb->heap_used > mb->heap_limit)
|
||||
--
|
||||
2.33.0
|
||||
14
pcre2.spec
14
pcre2.spec
@ -1,6 +1,6 @@
|
||||
Name: pcre2
|
||||
Version: 10.42
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: Perl Compatible Regular Expressions
|
||||
License: BSD
|
||||
URL: http://www.pcre.org/
|
||||
@ -8,10 +8,11 @@ Source0: https://github.com/PCRE2Project/pcre2/releases/download/%{name}-%{v
|
||||
|
||||
# Do no set RPATH if libdir is not /usr/lib
|
||||
Patch6000: backport-pcre2-10.10-Fix-multilib.patch
|
||||
Patch6019: backport-no-partial-match-if-trailing-data-is-invalid-utf-238.patch
|
||||
Patch6020: backport-Fix-an-invalid-match-of-ascii-word-classes-when-inva.patch
|
||||
Patch6021: backport-fix-wrong-test.patch
|
||||
Patch6030: sljit-sv48-sv57.patch
|
||||
Patch6001: backport-no-partial-match-if-trailing-data-is-invalid-utf-238.patch
|
||||
Patch6002: backport-Fix-an-invalid-match-of-ascii-word-classes-when-inva.patch
|
||||
Patch6003: backport-fix-wrong-test.patch
|
||||
Patch6004: sljit-sv48-sv57.patch
|
||||
Patch6005: backport-fix-a-possible-integer-overflow-in-DFA-matching-305.patch
|
||||
|
||||
BuildRequires: autoconf libtool automake coreutils gcc make readline-devel
|
||||
Obsoletes: pcre2-utf16 pcre2-utf32 pcre2-tools
|
||||
@ -128,6 +129,9 @@ make check
|
||||
%{_pkgdocdir}/html/
|
||||
|
||||
%changelog
|
||||
* Thu Dec 14 2023 xujing <xujing125@huawei.com> - 10.42-3
|
||||
+- DESC:fix a possible integer overflow in DFA matching (#305)
|
||||
|
||||
* Mon Dec 04 2023 Jingwiw <wangjingwei@iscas.ac.cn> - 10.42-2
|
||||
- enable riscv jit and fix error for sv48-sv57
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user