Endless loop when wrapping unbreakable words

Bug #34182 reported by Andrew Pam
4
Affects Status Importance Assigned to Milestone
libtext-wrapi18n-perl (Debian)
Fix Released
Unknown
libtext-wrapi18n-perl (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Executing the following perl code will enter an endless loop:

perl -MText::WrapI18N -e'print wrap("", " ", " Thisisaverylongwordthatcannotbewrappedbecauseitcontainsnospacesandthuscausesanendlessloop");'

The bug does not occur when using Text::Wrap instead. To cause the bug, both the second parameter and the string to be wrapped must start with a space. The string to be wrapped must contain at least one word longer than the wrap length (defaults to 72 characters).

Simon Law (sfllaw)
Changed in libtext-wrapi18n-perl:
status: Unconfirmed → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

This appears to be another instance of the linked Debian bug; at any rate, the same patch fixes it.

Revision history for this message
Colin Watson (cjwatson) wrote :

(That said, I don't really know the code so am not currently sure enough of myself to apply the patch ...)

Changed in libtext-wrapi18n-perl:
status: Confirmed → Triaged
Changed in libtext-wrapi18n-perl (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.