git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d2ffbe
)
perl: Check all images are defined in first param of open_guest.
author
Richard Jones
<rjones@redhat.com>
Fri, 11 Jun 2010 09:40:48 +0000
(10:40 +0100)
committer
Richard Jones
<rjones@redhat.com>
Mon, 12 Jul 2010 07:35:56 +0000
(08:35 +0100)
(cherry picked from commit
e67e216118df3a724482cb698a868ecbaacbf326
)
perl/lib/Sys/Guestfs/Lib.pm
patch
|
blob
|
history
diff --git
a/perl/lib/Sys/Guestfs/Lib.pm
b/perl/lib/Sys/Guestfs/Lib.pm
index
85c4790
..
bd42ee2
100644
(file)
--- a/
perl/lib/Sys/Guestfs/Lib.pm
+++ b/
perl/lib/Sys/Guestfs/Lib.pm
@@
-145,6
+145,13
@@
sub open_guest
croak __"open_guest: first parameter must be a string or an arrayref"
}
+ # Check each element of @images is defined.
+ # (See https://bugzilla.redhat.com/show_bug.cgi?id=601092#c3).
+ foreach (@images) {
+ croak __"open_guest: first argument contains undefined element"
+ unless defined $_;
+ }
+
my ($conn, $dom);
if (-e $images[0]) {