Skip to content

Commit

Permalink
[backend] Guard the readxml against bad XML
Browse files Browse the repository at this point in the history
  • Loading branch information
lbt authored and adrianschroeter committed Oct 30, 2014
1 parent fab5b35 commit 49cbd50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/backend/bs_admin
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,10 @@ while (@ARGV) {
my ($hash, $desc) = split(/\s+/, $_);
next if !defined( $sourcefiles{$hash.'-'.$desc});
# open link file to look if it links to a file that will be deleted
my $link = readxml($sourcefiles{$hash.'-'.$desc}, $BSXML::link);
eval {
my $link = readxml($sourcefiles{$hash.'-'.$desc}, $BSXML::link);
} ;
if ($@) { warn "$@ whilst processing $treesfiles{$file}"; next; }
next if !defined $link->{"package"} || !defined $link->{"project"} || !defined $link->{"rev"};
my $revision = getrev($link->{"project"}, $link->{"package"}, $link->{"rev"});
next if !defined($revision->{"time"});
Expand Down

0 comments on commit 49cbd50

Please sign in to comment.