Projects
Eulaceura:Factory
pcre2
_service:obs_scm:backport-fix-a-possible-intege...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:backport-fix-a-possible-integer-overflow-in-DFA-matching-305.patch of Package pcre2
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
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2