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/17 01:28:59 UTC
svn commit: r1339425 - /subversion/trunk/subversion/libsvn_ra_serf/xml.c
Author: gstein
Date: Wed May 16 23:28:59 2012
New Revision: 1339425
URL: http://svn.apache.org/viewvc?rev=1339425&view=rev
Log:
Watch out for dangling pointers.
* subversion/libsvn_ra_serf/xml.c:
(svn_ra_serf__xml_cb_start): copy the elemname into the pool, as it
contains pointers into the RAW_NAME parameter value
Modified:
subversion/trunk/subversion/libsvn_ra_serf/xml.c
Modified: subversion/trunk/subversion/libsvn_ra_serf/xml.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/xml.c?rev=1339425&r1=1339424&r2=1339425&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/xml.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/xml.c Wed May 16 23:28:59 2012
@@ -637,7 +637,8 @@ svn_ra_serf__xml_cb_start(svn_ra_serf__x
/* Some basic copies to set up the new estate. */
new_xes->state = scan->to_state;
- new_xes->tag = elemname;
+ new_xes->tag.name = apr_pstrdup(new_pool, elemname.name);
+ new_xes->tag.namespace = apr_pstrdup(new_pool, elemname.namespace);
new_xes->custom_close = scan->custom_close;
/* Start with the parent's namespace set. */