[Lxml-checkins] r48143 - in lxml/branch/lxml-1.3: . src/lxml

scoder at codespeak.net scoder at codespeak.net
Mon Oct 29 11:09:50 CET 2007


Author: scoder
Date: Mon Oct 29 11:09:50 2007
New Revision: 48143

Modified:
   lxml/branch/lxml-1.3/CHANGES.txt
   lxml/branch/lxml-1.3/src/lxml/objectify.pyx
Log:
fixed crash in ObjectPath

Modified: lxml/branch/lxml-1.3/CHANGES.txt
==============================================================================
--- lxml/branch/lxml-1.3/CHANGES.txt	(original)
+++ lxml/branch/lxml-1.3/CHANGES.txt	Mon Oct 29 11:09:50 2007
@@ -2,6 +2,18 @@
 lxml changelog
 ==============
 
+Under development
+=================
+
+Features added
+--------------
+
+Bugs fixed
+----------
+
+* Well hidden free-while-in-use crash bug in ObjectPath
+
+
 1.3.5 (2007-10-22)
 ==================
 

Modified: lxml/branch/lxml-1.3/src/lxml/objectify.pyx
==============================================================================
--- lxml/branch/lxml-1.3/src/lxml/objectify.pyx	(original)
+++ lxml/branch/lxml-1.3/src/lxml/objectify.pyx	Mon Oct 29 11:09:50 2007
@@ -1254,7 +1254,7 @@
             if index_pos is NULL:
                 index = 0
             else:
-                name = python.PyString_FromStringAndSize(
+                new_name = python.PyString_FromStringAndSize(
                     c_name, <Py_ssize_t>(index_pos - c_name))
                 index_pos = index_pos + 1
                 index_end = cstd.strchr(index_pos, c']')
@@ -1265,6 +1265,7 @@
                     index_pos, <Py_ssize_t>(index_end - index_pos)))
                 if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
                     raise ValueError, "index not allowed on root node"
+                name = new_name
         python.PyList_Append(new_path, (ns, name, index))
     if python.PyList_GET_SIZE(new_path) == 0:
         raise ValueError, "invalid path"


More information about the lxml-checkins mailing list