diff --git a/php_mailparse_mime.c b/php_mailparse_mime.c index e71bfec..e9d5c3e 100644 --- a/php_mailparse_mime.c +++ b/php_mailparse_mime.c @@ -198,6 +198,7 @@ static struct php_mimeheader_with_attributes *php_mimeheader_alloc_from_tok(php_ * * Original rfc2231 support by IceWarp Ltd. */ + currentencoded = 0; check_name = strchr(name, '*'); if (check_name) { currentencoded = 1; diff --git a/tests/rfc2231_plain_after_encoded.phpt b/tests/rfc2231_plain_after_encoded.phpt new file mode 100644 index 0000000..72c8d1b --- /dev/null +++ b/tests/rfc2231_plain_after_encoded.phpt @@ -0,0 +1,18 @@ +--TEST-- +A plain parameter following an RFC2231 (name*N) parameter is not leaked +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(6) "foobar" +string(3) "baz" +done