mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-16184: UBSan address overflowed in ext/pcre/php_pcre.c
This commit is contained in:
commit
ddc7a6b1fc
3 changed files with 21 additions and 4 deletions
|
@ -1728,9 +1728,11 @@ matched:
|
|||
}
|
||||
if (preg_get_backref(&walk, &backref)) {
|
||||
if (backref < count) {
|
||||
match_len = offsets[(backref<<1)+1] - offsets[backref<<1];
|
||||
memcpy(walkbuf, subject + offsets[backref<<1], match_len);
|
||||
walkbuf += match_len;
|
||||
if (offsets[backref<<1] < SIZE_MAX) {
|
||||
match_len = offsets[(backref<<1)+1] - offsets[backref<<1];
|
||||
memcpy(walkbuf, subject + offsets[backref<<1], match_len);
|
||||
walkbuf += match_len;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue