# Generated-file counterpart of the ext/pdo/pdo_sql_parser.re and # ext/standard/url_scanner_ex.re hunks of php-8.1.34-sury-9.patch # (so the fixes are built without re2c). Apply with -p1 after sury-9. 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 12:59:33.025497677 +0100 +++ b/ext/pdo/pdo_sql_parser.c 2026-11-20 12:59:33.065925906 +0100 @@ -392,7 +392,7 @@ if (t == PDO_PARSER_BIND) { ptrdiff_t len = s.cur - s.tok; - if ((ZSTR_VAL(inquery) < (s.cur - len)) && isalnum(*(s.cur - len - 1))) { + if ((ZSTR_VAL(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 12:59:33.044057656 +0100 +++ b/ext/standard/url_scanner_ex.c 2026-11-20 12:59:33.067960258 +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;