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

Re: svn_auth_cred_simple_t crash

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-03-13 15:18:37 CET

On Mar 13, 2005, at 7:48 AM, Martin Hauner wrote:

> Hi,
>
> if i set 'const char *password' in 'svn_auth_cred_simple_t' to 0
> subversion crashes in cram.c compute_digest (called from
> svn_ra_svn__cram_client) when running strlen on the password (on 1.1.x
> branch).
>
> This happens in my (client) code when the user does not enter a
> password in
> the prompt dialog.
>
> The code should check the pointer first.
>

Why do you say that? The various svn_auth.h APIs promise to either
return a "good" cred_simple_t structure, or NULL. I think it's
completely reasonable for code that receives a non-NULL cred_simple_t
structure to assume that the structure is complete.

I would argue that the bug is in your client. If the user doesn't
enter a password, then it should return a credentials structure with
password = "".

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 13 15:19:48 2005

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.