[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fixing possible segmentation fault

From: <kfogel_at_collab.net>
Date: 2006-01-30 14:56:46 CET

Julian Foad <julianfoad@btopenworld.com> writes:
> Daniel Berlin wrote:
> > Alexander Thomas wrote:
> >>svn_client_checkout2() fails with segmentation fault, if called with a
> >>revision argument as NULL. IMHO revision should be checked for NULL
> >>before using it further.
> > This is wrong in one of two ways.
> > Either
> > 1. We instead should just assert that revision != NULL, like we do for URL.
> > Nobody should be passing in a NULL revision to this function.
>
> +1 on this. The general rule is that you must not pass a null pointer
> to any API unless its documentation says you may, and in this case it
> does not say so.

I agree with Julian and Daniel here, but also, what was the context?
Did you find someone passing NULL for that parameter? (I.e., is there
some larger issue that needs correcting?)

Thanks,
-Karl

-- 
www.collab.net  <>  CollabNet  |  Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 30 16:37:00 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.