apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: How bullet proof ?
Date Wed, 17 Apr 2002 20:08:19 GMT
On Wed, Apr 17, 2002 at 04:00:25PM -0400, Dave Hill wrote:
> My first inclination was to think "what a bonehead thing to do", my
> second inclination was that maybe
> apr should protect me from myself a bit more....
> Wouldn't it make sense to make a path in that case with only src1 as the
> content ?
> -or-
> Wouldn't it make sense fo the function to return a NULL back to the
> caller if src1 or src2 are null
> -or-
> Wouldn't it make sense for me just to check my arguments be for calling
> apr :-)

APR, being a library, isn't in the business of checking for valid user
input. We'd prefer to save the extra cpu cycles.

I guess the technical argument in this case would be: NULL isn't a string,
but "" is.

(Now I think assert()s are a different story; but I'll save that for
a different discussion.)


View raw message