[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: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2006-01-30 15:29:33 CET

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.
>
> -AT
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.

*o*r, if you take the docstring "
 * @a revision must be of kind @c svn_opt_revision_number,
 * @c svn_opt_revision_head, or @c svn_opt_revision_date. If
 * @a revision does not meet these requirements, return the error
 * @c SVN_ERR_CLIENT_BAD_REVISION.
"
literally, then
2. A NULL revision argument should cause us to return
SVN_ERR_CLIENT_BAD_REVISION, which your patch does not.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 30 15:36:56 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.