base-files: ipcalc.sh handle start and range being empty strings

If we're being paranoid and quote all the arguments to ipcalc.sh,
it's possible to pass in empty start and range arguments.  This
should be handled the same as their being absent.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Link: https://github.com/openwrt/openwrt/pull/15946
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Philip Prindeville 2024-07-14 14:07:53 -06:00 committed by Hauke Mehrtens
parent f84a9f7dc0
commit 0037100e12
1 changed files with 1 additions and 0 deletions

View File

@ -96,6 +96,7 @@ echo "COUNT=$count"
# if there's no range, we're done
[ $# -eq 0 ] && exit 0
[ -z "$1$2" ] && exit 0
if [ "$prefix" -le 30 ]; then
lower=$((network + 1))