Check ARGV before subscripting it
authorGeraint Edwards <gedgey@gmail.com>
Thu, 28 Dec 2017 15:53:51 +0000 (15:53 +0000)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Thu, 28 Dec 2017 17:43:40 +0000 (18:43 +0100)
src/src/eximstats.src

index 76cfe7e9797194998546b1660a18682263a45359..8eb5cac896ec91e7f3895d2365bfe7fc973563df 100644 (file)
@@ -557,7 +557,7 @@ use File::Basename;
 # use Time::Local;  # PH/FANF
 use POSIX;
 
-if ($ARGV[0] eq '--version') {
+if (@ARGV and $ARGV[0] eq '--version') {
     print basename($0) . ": $0\n",
         "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
         "perl(runtime): $]\n";