Skip to content

Commit 153e292

Browse files
committed
Escape trigraph sequence
??= is a trigraph for #, so it needs to be escaped. To stay consistent I'm escaping all question marks in this literal, even though one of the latter two would suffice.
1 parent 6122f67 commit 153e292

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/iconv/iconv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
12241224
do {
12251225
size_t prev_in_left;
12261226
size_t out_size;
1227-
size_t encoded_word_min_len = sizeof("=??X??=")-1 + out_charset_len + (enc_scheme == PHP_ICONV_ENC_SCHEME_BASE64 ? 4 : 3);
1227+
size_t encoded_word_min_len = sizeof("=\?\?X\?\?=")-1 + out_charset_len + (enc_scheme == PHP_ICONV_ENC_SCHEME_BASE64 ? 4 : 3);
12281228

12291229
if (char_cnt < encoded_word_min_len + lfchars_len + 1) {
12301230
/* lfchars must be encoded in ASCII here*/

0 commit comments

Comments
 (0)