From 4235433c0eea1a25340202b3573e8d6ba6c46d4f Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Wed, 19 Apr 2006 21:47:25 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20334617:=20importxml.pl=20crashes=20when?= =?UTF-8?q?=20importing=20bugs=20having=20attachments=20from=20version=202?= =?UTF-8?q?.20=20or=20older=20-=20Patch=20by=20Fr=EF=BF=BDd=EF=BF=BDric=20?= =?UTF-8?q?Buclin=20=20r=3Dghendricks=20a=3Dmyk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webtools/bugzilla/importxml.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webtools/bugzilla/importxml.pl b/webtools/bugzilla/importxml.pl index 47f886c1c5c1..59bea430c3ef 100755 --- a/webtools/bugzilla/importxml.pl +++ b/webtools/bugzilla/importxml.pl @@ -397,7 +397,9 @@ sub process_attachment() { $attachment{'isobsolete'} = $attach->{'att'}->{'isobsolete'} || 0; $attachment{'isprivate'} = $attach->{'att'}->{'isprivate'} || 0; $attachment{'filename'} = $attach->field('filename') || "file"; - if ( defined( $attach->first_child('data')->{'att'}->{'encoding'} ) + # Attachment data is not exported in versions 2.20 and older. + if (defined $attach->first_child('data') + && defined $attach->first_child('data')->{'att'}->{'encoding'} && $attach->first_child('data')->{'att'}->{'encoding'} =~ /base64/ ) { # decode the base64