Index: util/faxrcvd.sh.in =================================================================== RCS file: /cvsroot/hylafax/util/faxrcvd.sh.in,v retrieving revision 1.25 diff -u -r1.25 faxrcvd.sh.in --- util/faxrcvd.sh.in 2005/07/18 19:02:49 1.25 +++ util/faxrcvd.sh.in 2005/12/16 23:23:34 @@ -103,7 +103,12 @@ MSG="$1"; shift; COUNT=1 while [ $# -ge 1 ]; do - eval "CALLID$COUNT=\"$1\"" + # In shell scripts, there are no special characters in hard-quoted + # strings (quoted with (')). Single-quotes can't even be escaped + # inside such strings and must be put outside of them. We thus replace + # (') with ('\'') which terminates the current string, adds a single + # quote and starts a new string. + eval "CALLID$COUNT='`echo $1 | $SED -e "s/'/'\\\\\''/g"`'" shift COUNT=`expr $COUNT + 1` done