summaryrefslogtreecommitdiff
path: root/scripts/vyatta-boot-image.pl
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2010-02-02 12:05:40 -0800
committerBob Gilligan <gilligan@vyatta.com>2010-02-02 12:05:40 -0800
commit5099cdd3d06e23e4b626802ab2cab27013be1ebc (patch)
tree2b58b6b5b4b65d28b1e5707240f4ad0b9eaa0dcf /scripts/vyatta-boot-image.pl
parent74bc8b47f163acd21c598828c08e7eab0b44df32 (diff)
downloadvyatta-op-5099cdd3d06e23e4b626802ab2cab27013be1ebc.tar.gz
vyatta-op-5099cdd3d06e23e4b626802ab2cab27013be1ebc.zip
Bugfix 2539: Validate input when user specifies image name.
Diffstat (limited to 'scripts/vyatta-boot-image.pl')
-rwxr-xr-xscripts/vyatta-boot-image.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/vyatta-boot-image.pl b/scripts/vyatta-boot-image.pl
index 127177d..276d704 100755
--- a/scripts/vyatta-boot-image.pl
+++ b/scripts/vyatta-boot-image.pl
@@ -219,6 +219,10 @@ sub doSelect {
last;
}
}
+ if (!defined($new_idx)) {
+ print "Version $new_ver not found.\n";
+ exit 1;
+ }
} else {
$new_idx = $ {$bentries}[$resp]->{'idx'};
$new_ver = $ {$bentries}[$resp]->{'ver'};