paccache: allow strictly integer for -k option
Verify the argument to -k is a non-negative integer. Leading zeros
are simply stripped.
'declare -i keep' allowed the argument to -k to be any arithmetic
evaluation expression. The simple assignment 'keep=$OPTARG' triggers
arithmetic evaluation implicitly, which can either consume a huge amount
of resources with input such as '2**2**32' or immediately produce an error
on invalid input. Instead, we simply 'declare -- keep' and avoid all that.
Signed-off-by: lolilolicon <lolilolicon@gmail.com>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
0 files changed, 0 insertions, 0 deletions