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

Re: [PATCH] Was: Re: Problem in 1.3.0 RC-6

From: Paul Burba <paulb_at_softlanding.com>
Date: 2005-12-16 22:29:24 CET

Philip Martin <philip@codematters.co.uk> wrote on 12/16/2005 03:24:32 PM:

> Paul Burba <paulb@softlanding.com> writes:
>
> > @@ -1062,18 +1062,20 @@
> > {
> > statstruct->ood_last_cmt_rev = b->ood_last_cmt_rev;
> > statstruct->ood_last_cmt_date = b->ood_last_cmt_date;
> > - statstruct->ood_last_cmt_author = b->ood_last_cmt_author;
> > + statstruct->ood_last_cmt_author =
> > + apr_pstrdup (pool, b->ood_last_cmt_author);
>
> If I delete svn:author will b->ood_last_cmt_author be NULL? If so
> then this will dump core.
>
> > }
> > }
> > else
> > {
> > struct file_baton *b = baton;
> > if (b->url)
> > - statstruct->url = b->url;
> > + statstruct->url = apr_pstrdup (pool, b->url);
> > statstruct->ood_last_cmt_rev = b->ood_last_cmt_rev;
> > statstruct->ood_last_cmt_date = b->ood_last_cmt_date;
> > statstruct->ood_kind = b->ood_kind;
> > - statstruct->ood_last_cmt_author = b->ood_last_cmt_author;
> > + statstruct->ood_last_cmt_author = apr_pstrdup (pool,
> > + b->ood_last_cmt_author);
>
> ditto
>
> > }
> > return SVN_NO_ERROR;
> > }
>
> --
> Philip Martin

Hi Philip,

I'm not sure I understand your concern. Is it that apr_pstrdup shouldn't
be passed a null value? Or is it something that might occur later if
statstruct->ood_last_cmt_author is set to null? Or something else
entirely?

On windows at least, if you pass apr_pstrdup null, it just returns null.
Is this not a safe cross-platform assumption?

Let me know.

Thanks,

Paul B.

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 16 22:31:07 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.