diff options
author | Norbert Preining <preining@logic.at> | 2017-11-13 14:46:04 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2017-11-13 14:46:04 +0000 |
commit | 0a02e64a0bffda4a790855d51deab7d8df6e3937 (patch) | |
tree | 85fa797d8f93b0e6e8ac1373a45c0b1edb627ce2 /Master/texmf-dist | |
parent | 30583788d2cdc36d25194cbb4014008d35efa409 (diff) |
fix possible undefined behaviour in paper handling
git-svn-id: svn://tug.org/texlive/trunk@45774 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 4712f2deed4..9a1dc2bb0c2 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -1237,8 +1237,12 @@ sub action_paper { } else { # program-specific paper my $prog = $action; # first argument is the program to change my $pkg = $TeXLive::TLPaper::paper{$prog}{'pkg'}; + if (!$pkg) { + tlwarn("Unknown paper configuration program $prog!\n"); + return ($F_ERROR); + } if (!$localtlpdb->get_package($pkg)) { - tlwarn("$prg: package $pkg is not installed - cannot adjust paper size!\n"); + tlwarn("$prg: package $prog is not installed - cannot adjust paper size!\n"); return ($F_ERROR); } my $arg = shift @ARGV; # get "paper" argument |