httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Richards <>
Subject Re: [BUG] rprintf SEGVs if given NULL for %S
Date Mon, 17 Feb 1997 09:50:17 GMT
Marc Slemko <> writes:

> I agree.  You must be careful the manner in which you fail, because in
> certain places failing in what seems to be the obvious way can lead to the
> client being able to trick the server into granting access when it
> shouldn't, etc. but in general I like the idea.  
> It is sloppy code to not check that in either the caller or the
> subroutine.  Easiest to check in the subroutine, and helps in debugging.
> I don't think the overhead is a real issue.
> We did a similar thing for whateveritwas that I submitted the patch for
> the other week... err, log_reason().  That's it.

I disagree. Putting checking into subroutines is bad practice except
when it's ifdef'd PARANOIA or something. You should never slow down
functions with paranoia checking. If there's a failure condition it
should be checked by the caller.

  Dr Paul Richards. Originative Solutions Ltd.  (Netcraft Ltd. contractor)
  Elsevier Science TIS online journal project.
  Phone: 0370 462071 (Mobile), +44 (0)1865 843155

View raw message