[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: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2006-02-02 13:19:28 CET

Hi, Alexander,

On Thu, 2 Feb 2006, Alexander Thomas wrote:

> On Mon, 2006-01-30 at 07:56 -0600, kfogel@collab.net wrote:
> > 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?)
> >
> I don't know about anyone passing NULL, I am culprit here.
>
> I passed NULL because I don't have a revision to pass. I know about the
> svn_opt_revision_unspecified and how to pass it, but was bit lazy and
> never though NULL could have break svn_client_checkout2().
>
You should assume that, unless the API docs say NULL is acceptable.

> I strongly feel that asserting revision (also peg revision) parameter
> will be good idea, because in the wild people can do all sorts of nasty
> things to our API.
>
And if they do, they'll get a crash and learn what not to do:-)

The problem is that if we start doing this, we will have to assert that
every parameter is valid. And it doesn't help much, because if the
parameter is NULL, you will get a crash anyway.

Best,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 2 13:20:14 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.