Philip Martin <philip@codematters.co.uk> wrote on 12/17/2005 10:48:56 AM:
> Paul Burba <paulb@softlanding.com> writes:
>
> > [[[
> > Follow-up to r16344 and r16494.
> >
> > Fix potential corruption of out of date info in svn_wc_status2_t.
> >
> > * subversion/libsvn_wc/status.c
> > (tweak_statushash): When copying out of date string info to the
> > svn_wc_status2_t structure, use apr_pstrdup rather than assigning
> > directly to the file/dir baton since the baton will be destroyed.
>
> "directly from" not "directly to"
>
> > ]]]
>
> Your mailer has mangled the whitespace, but the patch looks good.
> +1 to commit to the trunk.
Sorry, was writing that from home via a web interface to my work e-mail
account, hadn't used it much before. Clean patch and revised log message
below.
Paul B.
[[[
Follow-up to r16344 and r16494.
Fix potential corruption of out of date info in svn_wc_status2_t.
* subversion/libsvn_wc/status.c
(tweak_statushash): When copying out of date string info to the
svn_wc_status2_t structure, use apr_pstrdup rather than assigning
directly from the file/dir baton since the baton will be destroyed.
]]]
Index: subversion/libsvn_wc/status.c
===================================================================
--- subversion/libsvn_wc/status.c (revision 17843)
+++ subversion/libsvn_wc/status.c (working copy)
@@ -1054,7 +1054,7 @@
{
struct dir_baton *b = baton;
if (b->url)
- statstruct->url = b->url;
+ statstruct->url = apr_pstrdup (pool, b->url);
statstruct->ood_kind = b->ood_kind;
/* The last committed rev, date, and author for deleted items
isn't available. */
@@ -1062,18 +1062,22 @@
{
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;
+ if (b->ood_last_cmt_author)
+ statstruct->ood_last_cmt_author =
+ apr_pstrdup (pool, b->ood_last_cmt_author);
}
}
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;
+ if (b->ood_last_cmt_author)
+ statstruct->ood_last_cmt_author =
+ apr_pstrdup (pool, b->ood_last_cmt_author);
}
return SVN_NO_ERROR;
}
_____________________________________________________________________________
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 Mon Dec 19 14:15:51 2005