projects
/
openwrt
/
staging
/
blocktrron.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f84a9f7
)
base-files: ipcalc.sh handle start and range being empty strings
author
Philip Prindeville
<
[email protected]
>
Sun, 14 Jul 2024 20:07:53 +0000
(14:07 -0600)
committer
Hauke Mehrtens
<
[email protected]
>
Sun, 21 Jul 2024 15:31:59 +0000
(17:31 +0200)
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 <
[email protected]
>
Link:
https://github.com/openwrt/openwrt/pull/15946
Signed-off-by: Hauke Mehrtens <
[email protected]
>
package/base-files/files/bin/ipcalc.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/bin/ipcalc.sh
b/package/base-files/files/bin/ipcalc.sh
index ae7a5c9598814f37cd487c4f240ee6ad0a717d6a..871a49ed6e73170f70ff088f0bea36d51ce36c76 100755
(executable)
--- a/
package/base-files/files/bin/ipcalc.sh
+++ b/
package/base-files/files/bin/ipcalc.sh
@@
-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))