From 1d08cb2f7abb8d56855ff05d68d3e803b7e66c38 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 28 Mar 2008 17:33:13 +0000 Subject: [PATCH] =?utf8?q?Bug=20423439:=20show=5Fbug.cgi=20crashes=20when?= =?utf8?q?=20wrapping=20comments=20which=20contain=20Unicode=20characters?= =?utf8?q?=20and=20tabs=20in=20them=20-=20Patch=20by=20Fr=C3=83=C2=A9d?= =?utf8?q?=C3=83=C2=A9ric=20Buclin=20=20r/a=3Dmkanat?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/Util.pm | 5 +++++ 1 file changed, 5 insertions(+) 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"); } } -- 2.47.3