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

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



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 haven't seen the code to deal with (or not) trailing slash or
> other stupid things clever users do.

And thus I assume that it isn't there.  This snippet of code does not fill
me with confidence in the programmer's error-handling skills.
 -- 
John Hasler
john@dhh.gt.org (John Hasler)
Dancing Horse Hill
Elmwood, WI



Reply to: