From 53fa817901de43318b503edc02d3329f0208132f Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Tue, 19 Sep 2006 04:54:12 +0000 Subject: make sure argument to --size is numeric --- scripts/xdg-icon-resource | 5 +++++ scripts/xdg-icon-resource.in | 5 +++++ 2 files changed, 10 insertions(+) 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 ;; -- cgit v1.2.3