chiark
/
gitweb
/
~mdw
/
distorted-keys
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
keyfunc.sh: Protect arguments to expr(1).
[distorted-keys]
/
keyfunc.sh.in
diff --git
a/keyfunc.sh.in
b/keyfunc.sh.in
index 38ca243fe7ff31a6e7de1d920e27f8aa2a217876..2a10f267a46fdc3d69d434b181543fd7f6fbdd8b 100644
(file)
--- a/
keyfunc.sh.in
+++ b/
keyfunc.sh.in
@@
-144,7
+144,7
@@
check () {
validp=t
case "$thing" in
*"$nl"*) validp=nil ;;
validp=t
case "$thing" in
*"$nl"*) validp=nil ;;
- *) if ! expr >/dev/null "
$thing" : "
$ckpat\$"; then validp=nil; fi ;;
+ *) if ! expr >/dev/null "
Q$thing" : "Q
$ckpat\$"; then validp=nil; fi ;;
esac
case $validp in
nil) echo >&2 "$quis: bad $ckwhat \`$thing'"; exit 1 ;;
esac
case $validp in
nil) echo >&2 "$quis: bad $ckwhat \`$thing'"; exit 1 ;;