summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Avoid potential for undefined variable 'startinpos' in PyUnicode_DecodeUTF7().Guido van Rossum2009-03-051-2/+3
| | | | See issue #5389.
* Revert patch for #1706039, as it can crash the interpreter.Martin v. Löwis2008-12-231-25/+17
|
* Issue #1706039: Support continued reading from a file even afterMartin v. Löwis2008-12-131-17/+25
| | | | EOF was hit.
* backport r67246 from the trunkBenjamin Peterson2008-11-171-3/+36
|
* #3967: Correct a crash in count() and find() methods of string-like objects.Amaury Forgeot d'Arc2008-09-262-8/+6
| | | | | | | For example: "".count("xxxx", sys.maxint, 0) Backport of r66631.
* Issue #3751: str.rpartition would perform a left-partition when called withAmaury Forgeot d'Arc2008-09-011-1/+1
| | | | | | a unicode argument. Backport of r66119
* - Issue #3537: Fix an assertion failure when an empty but presized dictGeorg Brandl2008-08-111-0/+4
| | | | object was stored in the freelist. (backport from r65637.)
* Security patches from Apple: prevent int overflow when allocating memoryNeal Norwitz2008-07-315-15/+66
|
* Backport code from r65182:Neal Norwitz2008-07-281-0/+18
| | | | | | | | | Issue #2620: Overflow checking when allocating or reallocating memory was not always being done properly in some python types and extension modules. PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have all been updated to perform better checks and places in the code that would previously leak memory on the error path when such an allocation failed have been fixed.
* #2242: utf7 decoding crashes on bogus input on some Windows/MSVC versionsAntoine Pitrou2008-07-251-1/+1
|
* Issue 3110: Crash with weakref subclass,Amaury Forgeot d'Arc2008-06-161-4/+12
| | | | | | | | | | | seen after a "import multiprocessing.reduction" An instance of a weakref subclass can have attributes. If such a weakref holds the only strong reference to the object, deleting the weakref will delete the object. In this case, the callback must not be called, because the ref object is being deleted! Backport of r34309
* Backport r61468 from trunk: Improves the text of the IOError raisedGregory P. Smith2008-05-031-2/+5
| | | | when open() returns EINVAL. See issue2158.
* Correct previous checkin, probably a svn merge issue.Amaury Forgeot d'Arc2008-04-111-4/+4
| | | | | | | | | | Now the code is similar to the one in trunk/. The behavior was funny: >>> print (), repr(()) (), () >>> print (), repr(()) (), (...)
* - Issue #1686386: Tuple's tp_repr did not take into account the possibility ofGuido van Rossum2008-04-102-1/+18
| | | | | | | having a self-referential tuple, which is possible from C code. Nor did object's tp_str consider that a type's tp_str could do something that could lead to an inifinite recursion. Py_ReprEnter() and Py_EnterRecursiveCall(), respectively, fixed the issues. (Backport of r58288 from trunk to 2.5.)
* backport r62271 from trunk.Gregory P. Smith2008-04-101-1/+0
| | | | remove the now obsoleted assertion.
* Backport r62261 from trunk:Gregory P. Smith2008-04-091-0/+5
| | | | | | Prevent PyString_FromStringAndSize() from passing negative sizes on to lower level memory allocation functions. Raise a SystemError and return NULL instead.
* #1477: ur'\U0010FFFF' used to raise in narrow unicode builds.Amaury Forgeot d'Arc2008-03-241-4/+42
| | | | | | | Corrected the raw-unicode-escape codec to use UTF-16 surrogates in this case, like the unicode-escape codec does. Backport of r61793 and r61853
* Backport r61458:Neal Norwitz2008-03-181-11/+15
| | | | | Issue 2321: reduce memory usage (increase the memory that is returned to the system) by using pymalloc for the data of unicode objects.
* Fix the overflows in expandtabs(). "This time for sure!"Guido van Rossum2008-03-112-50/+65
| | | | (Exploit at request.)
* Added checks for integer overflows, contributed by Google. Some areMartin v. Löwis2008-02-143-6/+27
| | | | | only available if asserts are left in the code, in cases where they can't be triggered from Python code.
* Fix typo in constant name.Thomas Wouters2008-01-251-1/+1
|
* Use the right (portable) definition of the max of a Py_ssize_t.Thomas Wouters2008-01-251-1/+1
|
* Rewrite the list_inline_repeat overflow check slightly differently.Guido van Rossum2008-01-251-4/+5
|
* Backport r60246.Guido van Rossum2008-01-241-0/+5
| | | | Fix issue #1303614, test67.py.
* Backport r55080:Guido van Rossum2008-01-181-4/+85
| | | | | | Fix for #1303614 and #1174712: - __dict__ descriptor abuse for subclasses of built-in types - subclassing from both ModuleType and another built-in types
* Fix an edge case whereby the __del__() method of a classic class couldGuido van Rossum2008-01-181-0/+10
| | | | create a new weakref to the object.
* merge -r59315:59316 from py3k: Fix issue #1553: An errornous __length_hint__ ↵Christian Heimes2007-12-052-4/+6
| | | | can make list() raise a SystemError
* Spaces vs. Tabs.Georg Brandl2007-11-291-4/+4
| | | | (backport from rev. 59224)
* Fix bug #1517, a possible segfault in lookup().Guido van Rossum2007-11-291-0/+4
|
* Issue #1445: Fix a SystemError when accessing the ``cell_contents``Amaury Forgeot d'Arc2007-11-241-1/+6
| | | | | | attribute of an empty cell object. Now a ValueError is raised. Backport of r59170.
* Issue 1704621. Fix segfaults in list_repeat() and list_inplace_repeat().Guido van Rossum2007-11-121-5/+7
| | | | The C changes aren't quite the same as the patch given there; the test is.
* Backport r58892.Guido van Rossum2007-11-071-0/+1
| | | | Add missing "return NULL" in overflow check in PyString_Repr().
* Backport r58709 from trunk:Georg Brandl2007-11-022-7/+12
| | | | | | | | | Backport fixes for the code that decodes octal escapes (and for PyString also hex escapes) -- this was reaching beyond the end of the input string buffer, even though it is not supposed to be \0-terminated. This has no visible effect but is clearly the correct thing to do. (In 3.0 it had a visible effect after removing ob_sstate from PyString.) Also fixes #1098.
* Cause passing a string to generator.throw() to raise a deprecation warning.Brett Cannon2007-09-111-0/+6
|
* Bug #1763149: use proper slice syntax in docstring.Georg Brandl2007-07-292-4/+4
| | | | (backport)
* Patch #1673759: add a missing overflow check when formatting floatsGeorg Brandl2007-07-122-2/+4
| | | | | with %G. (backport from rev. 56298)
* Backport 55874:Neal Norwitz2007-06-112-4/+16
| | | | | Fix a bug when there was a newline in the string expandtabs was called on. This also catches another condition that can overflow.
* Prevent expandtabs() on string and unicode objects from causing a segfault whenNeal Norwitz2007-06-092-6/+28
| | | | | | | a large width is passed on 32-bit platforms. Found by Google. It would be good for people to review this especially carefully and verify I don't have an off by one error and there is no other way to cause overflow.
* Bug #1733488: Fix compilation of bufferobject.c on AIX.Martin v. Löwis2007-06-081-1/+1
|
* Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC()Neal Norwitz2007-05-161-1/+1
| | | | fails.
* Merge change 54982 from the trunk. This fixes the test_subprocess test in ↵Kristján Valur Jónsson2007-05-071-8/+7
| | | | the testsuite for VisualStudio2005 builds, by "sanitizing" the "mode" that is used in the posixmodule's fdopen(). In particular the non-standard "U" mode character is removed.
* the nb_long slot on classobject instances now defaults to call the nb_int ↵Kristján Valur Jónsson2007-05-071-1/+13
| | | | slot member if there is no __long__ attribute found. This is in accordance with a suggestion from Armin Rigo, and allows the test_getargs2.py test in the testsuite for x64
* Fix two problems that emerged when the testsuite was run with an x64 build: ↵Kristján Valur Jónsson2007-05-071-1/+1
| | | | PyLong_FromSSize_t incorrectly assumed an unsigned object, and itertools.count() had the wrong upper limit for the iterator.
* Backport r54757 - missing NULL checks.Georg Brandl2007-04-212-0/+10
|
* Revert 53667Raymond Hettinger2007-04-181-7/+7
|
* Revert SF #1615701 (rev 53655): dict.update() does *not* call __getitem__() orNeal Norwitz2007-04-161-1/+1
| | | | | | | keys() if subclassed. This is to remain consistent with 2.5. See discussion here: http://mail.python.org/pipermail/python-dev/2007-April/072565.html
* Revert 54813 for 2.5.1 release. Can be applied after 2.5 branch is unfrozen.Neal Norwitz2007-04-161-2/+2
|
* Fix a bug when using the __lltrace__ opcode tracer, and a problem sith ↵Kristján Valur Jónsson2007-04-131-2/+2
| | | | signed chars in frameobject.c which can occur with opcodes > 127
* Test and fix fromkeys optional argument.Raymond Hettinger2007-03-211-2/+2
|
* Extend work on rev 52962 and 53830 eliminating redundant PyObject_Hash() ↵Raymond Hettinger2007-03-202-2/+36
| | | | calls and fixing set/dict interoperability.