Projects
home:rottame:vhosts-ng:php80
php8
php8-CVE-2026-7568.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File php8-CVE-2026-7568.patch of Package php8
From 47def8ce1db1fdbffcfc1f5bb11877a0e22d4b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= <tim@tideways-gmbh.com> Date: Sun, 3 May 2026 20:02:57 +0200 Subject: [PATCH] GHSA-96wq-48vp-hh57: [metaphone] Fix signed integer overflow of char array offset Fixes GHSA-96wq-48vp-hh57 Fixes CVE-2026-7568 --- ext/standard/metaphone.c | 6 +++--- ext/standard/tests/GHSA-96wq-48vp-hh57.phpt | 22 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 ext/standard/tests/GHSA-96wq-48vp-hh57.phpt diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index 2ba7a839c88e..7affde44de1f 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -117,10 +117,10 @@ static const char _codes[26] = /* Allows us to safely look ahead an arbitrary # of letters */ /* I probably could have just used strlen... */ -static char Lookahead(char *word, int how_far) +static char Lookahead(char *word, size_t how_far) { char letter_ahead = '\0'; /* null by default */ - int idx; + size_t idx; for (idx = 0; word[idx] != '\0' && idx < how_far; idx++); /* Edge forward in the string... */ @@ -161,7 +161,7 @@ static char Lookahead(char *word, int how_far) /* {{{ metaphone */ static void metaphone(unsigned char *word, size_t word_len, zend_long max_phonemes, zend_string **phoned_word, int traditional) { - int w_idx = 0; /* point in the phonization we're at. */ + size_t w_idx = 0; /* point in the phonization we're at. */ size_t p_idx = 0; /* end of the phoned phrase */ size_t max_buffer_len = 0; /* maximum length of the destination buffer */ ZEND_ASSERT(word != NULL);
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
.