mirror of https://github.com/python/cpython.git
Merged revisions 77352-77354 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77352 | antoine.pitrou | 2010-01-07 18:46:49 +0100 (jeu., 07 janv. 2010) | 5 lines Issue #7455: Fix possible crash in cPickle on invalid input. Patch by Florent Xicluna. ........ r77353 | antoine.pitrou | 2010-01-07 18:49:37 +0100 (jeu., 07 janv. 2010) | 3 lines Fix attribution. Florent actually repackaged and reviewed Victor's patch (sorry!). ........ r77354 | antoine.pitrou | 2010-01-07 18:54:10 +0100 (jeu., 07 janv. 2010) | 3 lines Fix reattribution mistake when fixing attribution mistake! ........
This commit is contained in:
parent
0bc8f907ef
commit
01a15ea2b6
|
@ -1139,6 +1139,9 @@ def test_bad_input(self):
|
||||||
# Test issue4298
|
# Test issue4298
|
||||||
s = bytes([0x58, 0, 0, 0, 0x54])
|
s = bytes([0x58, 0, 0, 0, 0x54])
|
||||||
self.assertRaises(EOFError, pickle.loads, s)
|
self.assertRaises(EOFError, pickle.loads, s)
|
||||||
|
# Test issue7455
|
||||||
|
s = b'0'
|
||||||
|
self.assertRaises(pickle.UnpicklingError, pickle.loads, s)
|
||||||
|
|
||||||
|
|
||||||
class AbstractPersistentPicklerTests(unittest.TestCase):
|
class AbstractPersistentPicklerTests(unittest.TestCase):
|
||||||
|
|
|
@ -194,6 +194,9 @@ C-API
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #7455: Fix possible crash in cPickle on invalid input. Patch by
|
||||||
|
Victor Stinner.
|
||||||
|
|
||||||
- Issue #1628205: Socket file objects returned by socket.socket.makefile() now
|
- Issue #1628205: Socket file objects returned by socket.socket.makefile() now
|
||||||
properly handles EINTR within the read, readline, write & flush methods.
|
properly handles EINTR within the read, readline, write & flush methods.
|
||||||
The socket.sendall() method now properly handles interrupted system calls.
|
The socket.sendall() method now properly handles interrupted system calls.
|
||||||
|
|
|
@ -3729,7 +3729,7 @@ load_pop(UnpicklerObject *self)
|
||||||
*/
|
*/
|
||||||
if (self->num_marks > 0 && self->marks[self->num_marks - 1] == len) {
|
if (self->num_marks > 0 && self->marks[self->num_marks - 1] == len) {
|
||||||
self->num_marks--;
|
self->num_marks--;
|
||||||
} else if (len >= 0) {
|
} else if (len > 0) {
|
||||||
len--;
|
len--;
|
||||||
Py_DECREF(self->stack->data[len]);
|
Py_DECREF(self->stack->data[len]);
|
||||||
self->stack->length = len;
|
self->stack->length = len;
|
||||||
|
|
Loading…
Reference in New Issue