Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ext/iconv/iconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,12 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
const unsigned char *p;
size_t nbytes_required;

/* Some agents get confused about what char_cnt is; it will
* be at least 4 at this point; if caller messed up and gave
* too short of a max_line_len that was already caught above
* and handled with PHP_ICONV_ERR_TOO_BIG. */
ZEND_ASSERT(char_cnt >= 4);

smart_str_appendc(pretval, 'Q');
char_cnt--;
smart_str_appendc(pretval, '?');
Expand Down
Loading