From: Graeme Fowler Date: Fri, 23 Mar 2018 12:00:54 +0000 (+0000) Subject: exiqsumm fix: Check @ARGV exists before testing it X-Git-Tag: exim-4_91_RC3~31 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/0800ef83ee2e0f769c96b7d4b972038188331627 exiqsumm fix: Check @ARGV exists before testing it --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 459ffe11a..497c92ab2 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -15,6 +15,9 @@ GF/01 DEFER rather than ERROR on redis cluster MOVED response. next server in the list. For a cluster of N elements, all N servers must be defined in redis_servers. +GF/02 Catch and remove uninitialized value warning in exiqsumm + Check for existence of @ARGV before looking at $ARGV[0] + JH/01 Replace the store_release() internal interface with store_newblock(), which internalises the check required to safely use the old one, plus the allocate and data copy operations duplicated in both (!) of the diff --git a/src/src/exiqsumm.src b/src/src/exiqsumm.src index 551ca97ca..67772f5e8 100644 --- a/src/src/exiqsumm.src +++ b/src/src/exiqsumm.src @@ -45,7 +45,7 @@ use warnings; BEGIN { pop @INC if $INC[-1] eq '.' }; use File::Basename; -if ($ARGV[0] eq '--version') { +if (@ARGV && $ARGV[0] eq '--version') { print basename($0) . ": $0\n", "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n", "perl(runtime): $]\n";