Commit 1d08cb2f authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 423439: show_bug.cgi crashes when wrapping comments which contain Unicode…

Bug 423439: show_bug.cgi crashes when wrapping comments which contain Unicode characters and tabs in them - Patch by Fré©ric Buclin <LpSolit@gmail.com> r/a=mkanat
parent c57e5fa6
......@@ -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");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment