From d43b6370a73998f3da22af8130d5fd91c06cca57 Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 4 Jan 2010 06:33:12 +0000 Subject: [PATCH] fix for bugg 2915687: error checking for chtab syntax git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4873 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/chtab | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/sbin/chtab b/xCAT-server/sbin/chtab index ac89afd71..a66f345ed 100755 --- a/xCAT-server/sbin/chtab +++ b/xCAT-server/sbin/chtab @@ -67,6 +67,11 @@ if ($keypairs[0] !~ /([^\.\=]+)\.([^\.\=]+)\=(.+)/) { m/(.*)=(.*)/; my $key=$1; my $val=$2; + if (!defined($key) || !defined($val)) { + print "Incorrect argument \"$_\".\n"; + usage; + exit(1); + } $keyhash{$key}=$val; } } else {