Subject: Re: Trailing / in pathnames passed to build.sh
To: None <tech-toolchain@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-toolchain
Date: 08/16/2004 15:43:06
>>>> + OPTARG=`echo ${OPTARG} | sed -e 's/\/$//'`
>> Well, it will break if $OPTARG contains shell metacharacters; should
>> it maybe have " " in some places?
> Unlikely...no matter the metacharacters it's just stripping off a
> trailing /.
Is "echo ${OPTARG}" really safe in all shells even if ${OPTARG} is,
say, "/mnt/home->work"? (It works fine in our sh, and I don't have
others handy to try.)
What about when ${OPTARG} is "-n a m e-"? "/usr/***tmp***"?
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B