John Hasler wrote:

John Summerfield writes:


The size of cfgfile is what bothered me as soon as I saw it.Presumably
properly calculating the amount of storage to request takes care of that.



As I said: use snprintf or do something else. In fact, use snprintf anyway.



Leading / is fine...



We don't have the rest of the code, but it doesn't seem likely that / is a valid value for HOME.



You can't assume that. eg:
[EMAIL PROTECTED] root]# cat /etc/passwd | grep :/:
nobody:x:99:99:Nobody:/:/sbin/nologin
rpc:x:32:32:Portmapper RPC user:/:/bin/false
[EMAIL PROTECTED] root]#

[EMAIL PROTECTED]:~$ echo $HOME
/home/summer
[EMAIL PROTECTED]:~$ HOME=/ sh -c 'echo $HOME'
/
[EMAIL PROTECTED]:~$ HOME=/$HOME sh -c 'echo $HOME'
//home/summer
[EMAIL PROTECTED]:~$

If you mean something different from all of these, please clarify.




--

Cheers
John

-- spambait
[EMAIL PROTECTED]  [EMAIL PROTECTED]
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Reply via email to