zendframework/zend-mime

70+ periods in a single line causes an infinite loop in Mime::encodeQuotedPrintable

usox opened this issue · 3 comments

usox commented

Passing a string, which contains at least of 70 period-characters (but not in the first line), to Mime::encodeQuotedPrintable ends in an infinite loop.

This behaviour was introcued by 2b72be3.

Code to reproduce the issue

$line = "test\n".str_repeat('.', 70);

$result = \Zend\Mime\Mime::encodeQuotedPrintable(
        $line
);

var_dump($result);

Expected results

No infinite loop.

Actual results

Infinite loop.

Hi it exists already a preq #32 that fix this behaviour

Hi, my preq was merged. Can you retry/test this behaviour?

usox commented

@EugenGanshorn Fix confirmed. It now works as expected. Thanks!