diff options
author | Waldo Bastian <waldo.bastian@intel.com> | 2006-09-19 04:54:12 +0000 |
---|---|---|
committer | Waldo Bastian <waldo.bastian@intel.com> | 2006-09-19 04:54:12 +0000 |
commit | 53fa817901de43318b503edc02d3329f0208132f (patch) | |
tree | 9b8e8669db071e06be0d1dfa3371ab51dc2bec5f | |
parent | 4815a9fb4b18927d40e20d0d2e8f1d70f078b205 (diff) |
make sure argument to --size is numeric
-rwxr-xr-x | scripts/xdg-icon-resource | 5 | ||||
-rw-r--r-- | scripts/xdg-icon-resource.in | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/scripts/xdg-icon-resource b/scripts/xdg-icon-resource index f8ac73a..5af9d00 100755 --- a/scripts/xdg-icon-resource +++ b/scripts/xdg-icon-resource @@ -533,6 +533,11 @@ while [ $# -gt 0 ] ; do if [ -z "$1" ] ; then exit_failure_syntax "size argument missing for --size" fi + case "$1" in + *[^0-9]*) + exit_failure_syntax "size argument must be numeric" + ;; + esac size="$1" shift ;; diff --git a/scripts/xdg-icon-resource.in b/scripts/xdg-icon-resource.in index 64ded23..724f3f4 100644 --- a/scripts/xdg-icon-resource.in +++ b/scripts/xdg-icon-resource.in @@ -146,6 +146,11 @@ while [ $# -gt 0 ] ; do if [ -z "$1" ] ; then exit_failure_syntax "size argument missing for --size" fi + case "$1" in + *[^0-9]*) + exit_failure_syntax "size argument must be numeric" + ;; + esac size="$1" shift ;; |