Merge pull request #292 from phreaker0/validate-send-size

check for valid estimated send size to prevent a perl warning on syst…
This commit is contained in:
Jim Salter 2018-12-04 15:04:41 -05:00 committed by GitHub
commit 173816351a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -1154,6 +1154,11 @@ sub getsendsize {
}
chomp $sendsize;
# check for valid value
if ($sendsize !~ /^\d+$/) {
$sendsize = '';
}
# to avoid confusion with a zero size pv, give sendsize
# a minimum 4K value - or if empty, make sure it reads UNKNOWN
if ($debug) { print "DEBUG: sendsize = $sendsize\n"; }