Raw patches from omega8cc/boa (5.x-dev, aegir/patches/php-sec): php-8.0.30-cve-2026-109618-109619.patch php-8.0.30-sury-25.patch php-8.0.30-xlts-1.patch php-8.0.30-xlts-2.patch (19 November 2026 release, incl. GH-24046) php-8.0.30-sury-25-re2c-generated.patch (own patch) applies the pdo_sql_parser.re and url_scanner_ex.re hunks of sury-25 to the generated *.c files, so the fixes are built without re2c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.8 KiB
Diff
46 lines
1.8 KiB
Diff
# Generated-file counterpart of the ext/pdo/pdo_sql_parser.re and
|
|
# ext/standard/url_scanner_ex.re hunks of php-8.0.30-sury-25.patch
|
|
# (so the fixes are built without re2c). Apply with -p1 after sury-25.
|
|
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 13:56:18.039743547 +0100
|
|
+++ b/ext/pdo/pdo_sql_parser.c 2026-11-20 13:56:18.043743569 +0100
|
|
@@ -397,7 +397,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 13:56:18.047743589 +0100
|
|
+++ b/ext/standard/url_scanner_ex.c 2026-11-20 13:56:18.051743612 +0100
|
|
@@ -86,7 +86,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);
|
|
@@ -135,7 +135,7 @@
|
|
char *q;
|
|
|
|
for (q = key; *q; q++) {
|
|
- *q = tolower(*q);
|
|
+ *q = tolower((unsigned char)*q);
|
|
}
|
|
keylen = q - key;
|
|
if (keylen > 0) {
|
|
@@ -449,7 +449,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;
|