# 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;