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

Re: svn commit: r1149572 - /subversion/trunk/subversion/mod_authz_svn/mod_authz_svn.c

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Fri, 22 Jul 2011 10:24:28 -0400

On 07/22/2011 07:33 AM, philip_at_apache.org wrote:
> Author: philip
> Date: Fri Jul 22 11:33:14 2011
> New Revision: 1149572

[...]

> @@ -245,7 +245,7 @@ static char *
> get_username_to_authorize(request_rec *r, authz_svn_config_rec *conf)
> {
> char *username_to_authorize = r->user;
> - if (conf->force_username_case)
> + if (username_to_authorize && conf->force_username_case)
> {
> username_to_authorize = apr_pstrdup(r->pool, r->user);
> convert_case(username_to_authorize,

Minor nit: Given that it's actually r->user that's passed to apr_pstrdup()
and was causing the SEGFAULT, it's slightly less obvious to have tested
username_to_authorize for NULL-ness. That said, I think it's fine in the
code today due to the proximity of the clarifying assignment (that is,
"username_to_authorize = r->user").

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2011-07-22 16:25:19 CEST

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.