From: lpsolit%gmail.com <> Date: Fri, 28 Mar 2008 17:33:13 +0000 (+0000) Subject: Bug 423439: show_bug.cgi crashes when wrapping comments which contain Unicode charact... X-Git-Tag: bugzilla-3.1.3~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d08cb2f7abb8d56855ff05d68d3e803b7e66c38;p=thirdparty%2Fbugzilla.git Bug 423439: show_bug.cgi crashes when wrapping comments which contain Unicode characters and tabs in them - Patch by Frédéric Buclin r/a=mkanat --- diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 1471295fc3..da41008e15 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -312,6 +312,11 @@ sub wrap_comment { $wrappedcomment .= ($line . "\n"); } else { + # Due to a segfault in Text::Tabs::expand() when processing tabs with + # Unicode (see http://rt.perl.org/rt3/Public/Bug/Display.html?id=52104), + # we have to remove tabs before processing the comment. This restriction + # can go away when we require Perl 5.8.9 or newer. + $line =~ s/\t/ /g; $wrappedcomment .= (wrap('', '', $line) . "\n"); } }