You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2012/07/18 06:02:26 UTC
svn commit: r1362755 - in /subversion/branches/1.7.x: ./ STATUS
subversion/libsvn_ra_serf/xml.c
Author: svn-role
Date: Wed Jul 18 04:02:26 2012
New Revision: 1362755
URL: http://svn.apache.org/viewvc?rev=1362755&view=rev
Log:
Merge r1337441 from trunk:
* r1337441
Fix XML namespace expansion in ra_serf
Justification:
Avoids segfaults caused by a malicious server sending unknown prefixes
to ra_serf. (and corrects the semantics for a bonus win)
Votes:
+1: gstein, rhuijben, cmpilato
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_ra_serf/xml.c
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1337441
Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1362755&r1=1362754&r2=1362755&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Wed Jul 18 04:02:26 2012
@@ -110,14 +110,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1337441
- Fix XML namespace expansion in ra_serf
- Justification:
- Avoids segfaults caused by a malicious server sending unknown prefixes
- to ra_serf. (and corrects the semantics for a bonus win)
- Votes:
- +1: gstein, rhuijben, cmpilato
-
* r1352068
Do not use non-constant initializers in struct variables, since this
violates C'89 and C'90.
Modified: subversion/branches/1.7.x/subversion/libsvn_ra_serf/xml.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_ra_serf/xml.c?rev=1362755&r1=1362754&r2=1362755&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_ra_serf/xml.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_ra_serf/xml.c Wed Jul 18 04:02:26 2012
@@ -91,37 +91,27 @@ svn_ra_serf__expand_ns(svn_ra_serf__dav_
const char *name)
{
const char *colon;
- svn_ra_serf__dav_props_t prop_name;
colon = strchr(name, ':');
if (colon)
{
svn_ra_serf__ns_t *ns;
- prop_name.namespace = NULL;
-
for (ns = ns_list; ns; ns = ns->next)
{
if (strncmp(ns->namespace, name, colon - name) == 0)
{
- prop_name.namespace = ns->url;
- break;
+ returned_prop_name->namespace = ns->url;
+ returned_prop_name->name = colon + 1;
+ return;
}
}
-
- SVN_ERR_ASSERT_NO_RETURN(prop_name.namespace);
-
- prop_name.name = colon + 1;
- }
- else
- {
- /* use default namespace for now */
- prop_name.namespace = "";
- prop_name.name = name;
}
- *returned_prop_name = prop_name;
- return;
+ /* If there is no prefix, or if the prefix is not found, then the
+ name is NOT within a namespace. */
+ returned_prop_name->namespace = "";
+ returned_prop_name->name = name;
}
void