Add security patches for PHP 7.4.33.

Raw patches from omega8cc/boa (5.x-dev, aegir/patches/php-sec):

  php-7.4.33-cve-2026-109618-109619.patch
  php-7.4.33-sury-31.patch
  php-7.4.33-xlts-1.patch
  php-7.4.33-xlts-2.patch

php-7.4.33-sury-31-re2c-generated.patch (own patch) applies the
pdo_sql_parser.re and url_scanner_ex.re hunks of sury-31 to the
generated *.c files, so the fixes are built without re2c.
(ext/date/lib/parse_iso_intervals.c already contains the fix of the
parse_iso_intervals.re hunk.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrisandClaude Opus 5.5 committed 2026-11-20 18:47:37 +01:00
1 parent f19ee454d1
commit 6a3b03fd9f
5 files changed
+19833

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
# Generated-file counterpart of the ext/pdo/pdo_sql_parser.re and
# ext/standard/url_scanner_ex.re hunks of php-7.4.33-sury-31.patch
# (so the fixes are built without re2c). Apply with -p1 after sury-31.
diff -ru a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c
--- a/ext/pdo/pdo_sql_parser.c 2026-11-20 18:29:51.301889386 +0100
+++ b/ext/pdo/pdo_sql_parser.c 2026-11-20 18:29:51.311295846 +0100
@@ -398,7 +398,7 @@
if (t == PDO_PARSER_BIND) {
ptrdiff_t len = s.cur - s.tok;
- if ((inquery < (s.cur - len)) && isalnum(*(s.cur - len - 1))) {
+ if ((inquery < (s.cur - len)) && isalnum((unsigned char)s.cur[-len - 1])) {
continue;
}
query_type |= PDO_PLACEHOLDER_NAMED;
diff -ru a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c
--- a/ext/standard/url_scanner_ex.c 2026-11-20 18:29:51.305135831 +0100
+++ b/ext/standard/url_scanner_ex.c 2026-11-20 18:29:51.314432610 +0100
@@ -88,7 +88,7 @@
*val++ = '\0';
for (q = key; *q; q++) {
- *q = tolower(*q);
+ *q = tolower((unsigned char)*q);
}
keylen = q - key;
str = zend_string_init(key, keylen, 1);
@@ -137,7 +137,7 @@
char *q;
for (q = key; *q; q++) {
- *q = tolower(*q);
+ *q = tolower((unsigned char)*q);
}
keylen = q - key;
if (keylen > 0) {
@@ -451,7 +451,7 @@
}
smart_str_appendl(&ctx->tag, start, YYCURSOR - start);
for (i = 0; i < ZSTR_LEN(ctx->tag.s); i++)
- ZSTR_VAL(ctx->tag.s)[i] = tolower((int)(unsigned char)ZSTR_VAL(ctx->tag.s)[i]);
+ ZSTR_VAL(ctx->tag.s)[i] = tolower((unsigned char)ZSTR_VAL(ctx->tag.s)[i]);
/* intentionally using str_find here, in case the hash value is set, but the string val is changed later */
if ((ctx->lookup_data = zend_hash_str_find_ptr(ctx->tags, ZSTR_VAL(ctx->tag.s), ZSTR_LEN(ctx->tag.s))) != NULL) {
ok = 1;