Commit Graph

44 Commits

Author SHA1 Message Date
Serhiy Storchaka 763a61ca95 Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
2016-04-10 18:05:12 +03:00
Serhiy Storchaka bc62af1bbe Issue #22570: Renamed Py_SETREF to Py_XSETREF. 2016-04-06 09:51:18 +03:00
Serhiy Storchaka 2e6c829681 Issue #20440: More use of Py_SETREF.
This patch is manually crafted and contains changes that couldn't be handled
automatically.
2015-12-27 15:41:58 +02:00
Serhiy Storchaka 20a003bea4 Issue #24103: Fixed possible use after free in ElementTree.iterparse(). 2015-12-24 11:51:24 +02:00
Serhiy Storchaka 33ea29772d Fixed possible leaks in ElementTree parser. 2015-12-09 19:44:30 +02:00
Serhiy Storchaka 45cf0b7f3e Issue25814: Propagate all errors from custom XML parser handlers
in ElementTree.iterparse().
2015-12-06 23:51:53 +02:00
Serhiy Storchaka b5b76c370b Fixed compilation error introduced in 745fd5550bc0. 2015-11-26 11:21:47 +02:00
Serhiy Storchaka c4c64be1b8 Issue #19687: Fixed possible integer overflows in ElementTree.
Based on patch by Christian Heimes.
2015-11-25 20:12:58 +02:00
Serhiy Storchaka a0ae9ff006 Issue #19687: Fixed memory leak on failed Element slice assignment. 2015-11-22 12:31:11 +02:00
Serhiy Storchaka 25598f35d7 Issue #24091: Fixed various crashes in corner cases in cElementTree. 2015-05-18 18:28:57 +03:00
Serhiy Storchaka 98a9722e4a Issue #20437: Fixed 43 potential bugs when deleting objects references. 2014-02-09 13:14:04 +02:00
Eli Bendersky 71142c4e86 Fix indentation from previous commit 2013-11-28 06:37:25 -08:00
Eli Bendersky f933e081dd Issue #19815: Fix segfault when parsing empty namespace declaration.
Based on patches by Christian Heimes and Vajrasky Kok
2013-11-28 06:25:45 -08:00
Eli Bendersky b671701149 Issue #13612: Fix a buffer overflow in case of a multi-byte encoding.
This is a belated backport of f7b47fb30169; Patch by Serhiy Storchaka.
2013-08-04 06:09:49 -07:00
Florent Xicluna 0965ee213e Issue #2892: preserve iterparse events in case of SyntaxError 2011-11-01 23:34:41 +01:00
Florent Xicluna 67d5d0ed44 Closes #7334: close source files on ElementTree.parse and iterparse (partial backport of issue #10093 from 3.2). 2011-10-29 03:38:56 +02:00
Larry Hastings 402b73fb8d Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
2010-03-25 00:54:54 +00:00
Florent Xicluna e2e81e8fcd Fix repr of tree Element on windows. 2010-03-11 15:55:11 +00:00
Florent Xicluna 3e8c189faa Issue #6472: The xml.etree package is updated to ElementTree 1.3. The cElementTree module is updated too. 2010-03-11 14:36:19 +00:00
Gregory P. Smith dd96db63f6 This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html

Python 2.6 should stick with PyString_* in its codebase.  The PyBytes_* names
in the spirit of 3.0 are available via a #define only.  See the email thread.
2008-06-09 04:58:54 +00:00
Christian Heimes 593daf545b Renamed PyString to PyBytes 2008-05-26 12:51:38 +00:00
Christian Heimes 87dcf3d260 Coverity issue CID #182
size_error: Allocating 1 bytes to pointer "children", which needs at least 4 bytes
2008-01-18 08:04:57 +00:00
Christian Heimes e93237dfcc #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available. 2007-12-19 02:37:44 +00:00
Martin v. Löwis 6819210b9e PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Fredrik Lundh dc075b9ddd SF#1534630
ignore data that arrives before the opening start tag
2006-08-16 16:47:07 +00:00
Neal Norwitz 6f5ff3f3eb Klocwork made another run and found a bunch more problems.
This is the first batch of fixes that should be easy to verify based on context.

This fixes problem numbers: 220 (ast), 323-324 (symtable),
321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
2006-08-12 01:43:40 +00:00
Trent Mick f08d663a2f Upgrade pyexpat to expat 2.0.0 (http://python.org/sf/1462338). 2006-06-19 23:21:25 +00:00
Neal Norwitz c7074386b4 Fix some Py_ssize_t issues 2006-06-12 02:06:17 +00:00
Fredrik Lundh 81707f1a8c "_self" is a said to be a reserved word in Watcom C 10.6. I'm
not sure that's really standard compliant behaviour, but I guess
we have to fix that anyway...
2006-06-03 21:56:05 +00:00
Neal Norwitz c6a989ac3a Fix problems found by Coverity.
longobject.c: also fix an ssize_t problem
  <a> could have been NULL, so hoist the size calc to not use <a>.

_ssl.c: under fail: self is DECREF'd, but it would have been NULL.

_elementtree.c: delete self if there was an error.

_csv.c: I'm not sure if lineterminator could have been anything other than
a string.  However, other string method calls are checked, so check this
one too.
2006-05-10 06:57:58 +00:00
Fredrik Lundh 44ed4db955 merged with cElementTree development trunk (1.0.6 snapshot):
Fixed a number of potential null-pointer-reference-under-pressure
glitches, based on input from the Coverity analysis tool and Simo
Salminen.
2006-03-12 21:06:35 +00:00
Martin v. Löwis 02cbf4ae4b More unconsting. 2006-02-27 17:20:04 +00:00
Martin v. Löwis 18e165558b Merge ssize_t branch. 2006-02-15 17:27:45 +00:00
Neal Norwitz 02876df9de Check return results for errors 2006-02-07 06:58:52 +00:00
Neal Norwitz 1ac754fa10 Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
2006-01-19 06:09:39 +00:00
Fredrik Lundh c3389997d4 SF#1389809
cast first PyUnicode_Decode argument to proper type (why is
"char *" used for encoded byte streams, btw?  shouldn't that
be "void *" or, if necessary, "unsigned char *"?)
2005-12-25 11:40:19 +00:00
Fredrik Lundh 0149e3a090 Fixed None reference leaks in TreeBuilder class (reported by Neal
Norwitz)
2005-12-18 13:58:25 +00:00
Fredrik Lundh b80775ecf1 Fixed reference counting error when using the entity dictionary
(reported by Chris Olds).  Backported from the 1.0.6 development
branch.
2005-12-17 08:33:21 +00:00
Fredrik Lundh 6d52b55c56 updating to cElementTree 1.0.5 (step 3 of 3) 2005-12-16 22:06:43 +00:00
Fredrik Lundh 8c8836b406 updating to cElementTree 1.0.5 (step 2 of 3) 2005-12-16 22:06:06 +00:00
Fredrik Lundh 7cfe6eee0d updating to cElementTree 1.0.5 2005-12-16 22:05:40 +00:00
Fredrik Lundh c97ba7064e added PSG licensing blurb 2005-12-14 22:30:36 +00:00
Fredrik Lundh 14b4feac6a renamed to _elementtree (for Python 2.5) 2005-12-14 21:46:41 +00:00
Fredrik Lundh 0c53bfd374 copied cElementTree 1.0.4 to Modules 2005-12-14 21:45:58 +00:00