zendframework / zend-mime

Mime component from Zend Framework
BSD 3-Clause "New" or "Revised" License
62 stars 37 forks source link

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

Closed usox closed 6 years ago

usox commented 6 years ago

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 2b72be3dcb44176572884bc270a42381519abc05.

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.

EugenGanshorn commented 6 years ago

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

EugenGanshorn commented 6 years ago

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

usox commented 6 years ago

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