subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r1339425 - /subversion/trunk/subversion/libsvn_ra_serf/xml.c
Date Wed, 16 May 2012 23:28:59 GMT
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.  */



Mime
View raw message