From e52f76c1afb168546e559391af10d93b1e8f9721 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 4 Mar 2020 01:25:36 +0000 Subject: fix uninitialize variable warning when pubkey is missing git-svn-id: svn://tug.org/texlive/trunk@54064 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLCrypto.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Master/tlpkg/TeXLive') diff --git a/Master/tlpkg/TeXLive/TLCrypto.pm b/Master/tlpkg/TeXLive/TLCrypto.pm index 4554da030a9..76511df521e 100644 --- a/Master/tlpkg/TeXLive/TLCrypto.pm +++ b/Master/tlpkg/TeXLive/TLCrypto.pm @@ -595,9 +595,12 @@ sub gpg_verify_signature { debug("verification succeeded, output:\n$out\n"); return ($VS_VERIFIED, $out); } else { - if (grep(/^\[GNUPG:\] NO_PUBKEY (.*)/, @status_lines)) { - debug("missing pubkey $1\n"); - return ($VS_PUBKEY_MISSING, "missing pubkey $1"); + my @nopb = grep(/^\[GNUPG:\] NO_PUBKEY /, @status_lines); + if (@nopb) { + my $mpk = $nopb[-1]; + $mpk =~ s/^\[GNUPG:\] NO_PUBKEY //; + debug("missing pubkey $mpk\n"); + return ($VS_PUBKEY_MISSING, "missing pubkey $mpk"); } # we could do more checks on what is the actual problem here! return ($VS_SIGNATURE_ERROR, $out); -- cgit v1.2.3