[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: So you think you are (or wanna be) a hacker



William Ballard wrote:

So set the ball rolling, here is a snippet from a program I found via freshmeat the other day:
	configfile = malloc(strlen(getenv("HOME")) + 20);
	sprintf(configfile,"%s/%s",getenv("HOME"), cfgfile);

The length of HOME could increase between invocations. I don't fancy myself a very good C programmer, so I piped up.

Your answer qualified you to answer:-)


--

Cheers
John

-- spambait
1aaaaaaa@computerdatasafe.com.au  Z1aaaaaaa@computerdatasafe.com.au
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/



Reply to: