You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2012/05/11 23:40:55 UTC
svn commit: r1337388 -
/subversion/trunk/subversion/libsvn_ra_serf/get_deleted_rev.c
Author: gstein
Date: Fri May 11 21:40:55 2012
New Revision: 1337388
URL: http://svn.apache.org/viewvc?rev=1337388&view=rev
Log:
Note a problem. The new xml parsers should correct issues like this.
* subversion/libsvn_ra_serf/get_deleted_rev.c:
(cdata_getdrev): this function could be invoked N times with a
single character of the revision. the approach used here is wrong.
leave a marker noting that.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/get_deleted_rev.c
Modified: subversion/trunk/subversion/libsvn_ra_serf/get_deleted_rev.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/get_deleted_rev.c?rev=1337388&r1=1337387&r2=1337388&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/get_deleted_rev.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/get_deleted_rev.c Fri May 11 21:40:55 2012
@@ -126,6 +126,7 @@ cdata_getdrev(svn_ra_serf__xml_parser_t
switch (state)
{
case VERSION_NAME:
+ /* ### wrong. we might not have all the cdata! */
parser->state->private = svn_string_ncreate(data, len,
parser->state->pool);
break;
Re: svn commit: r1337388 - /subversion/trunk/subversion/libsvn_ra_serf/get_deleted_rev.c
Posted by Greg Stein <gs...@gmail.com>.
On May 14, 2012 3:50 AM, "C. Michael Pilato" <cm...@collab.net> wrote:
>
> On 05/11/2012 05:40 PM, gstein@apache.org wrote:
> > Author: gstein
> > Date: Fri May 11 21:40:55 2012
> > New Revision: 1337388
> >
> > URL: http://svn.apache.org/viewvc?rev=1337388&view=rev
> > Log:
> > Note a problem. The new xml parsers should correct issues like this.
> >
> > * subversion/libsvn_ra_serf/get_deleted_rev.c:
> > (cdata_getdrev): this function could be invoked N times with a
> > single character of the revision. the approach used here is wrong.
> > leave a marker noting that.
>
> ... and these aren't merely theoretical problems -- I've run into several
> real-world incidences of this sort before. Need to use a stringbuf to
> collect all the CDATA, and transfer to the preferred storage
location/format
> in the end-tag handler.
Yup, exactly! The new code does this properly and automagically, so we
won't see these odd one-off errors. This specific code has already been
upgraded.
Cheers,
-g
Re: svn commit: r1337388 - /subversion/trunk/subversion/libsvn_ra_serf/get_deleted_rev.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 05/11/2012 05:40 PM, gstein@apache.org wrote:
> Author: gstein
> Date: Fri May 11 21:40:55 2012
> New Revision: 1337388
>
> URL: http://svn.apache.org/viewvc?rev=1337388&view=rev
> Log:
> Note a problem. The new xml parsers should correct issues like this.
>
> * subversion/libsvn_ra_serf/get_deleted_rev.c:
> (cdata_getdrev): this function could be invoked N times with a
> single character of the revision. the approach used here is wrong.
> leave a marker noting that.
... and these aren't merely theoretical problems -- I've run into several
real-world incidences of this sort before. Need to use a stringbuf to
collect all the CDATA, and transfer to the preferred storage location/format
in the end-tag handler.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Enterprise Cloud Development