summaryrefslogtreecommitdiffstats
path: root/Modules/cPickle.c
diff options
context:
space:
mode:
authorFacundo Batista <facundobatista@gmail.com>2008-06-22 23:19:14 (GMT)
committerFacundo Batista <facundobatista@gmail.com>2008-06-22 23:19:14 (GMT)
commit9da18b313342ec6d81bd5ea5d19c1d05f6a41a08 (patch)
tree3c706630f29a94fa2b64932dbf8e2a48766112a4 /Modules/cPickle.c
parent2694eb021977322eefeb39e71b13eb20085c20a2 (diff)
downloadcpython-9da18b313342ec6d81bd5ea5d19c1d05f6a41a08.zip
cpython-9da18b313342ec6d81bd5ea5d19c1d05f6a41a08.tar.gz
cpython-9da18b313342ec6d81bd5ea5d19c1d05f6a41a08.tar.bz2
Fixing the problem stated in issue 2702 with the patch submitted
in the issue 3165. Now cPickle does not fails with uncontrolled behaviour when pickling into a very deep nested structure.
Diffstat (limited to 'Modules/cPickle.c')
-rw-r--r--Modules/cPickle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index afa75fd..e4bb7a1 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -1519,6 +1519,7 @@ batch_list(Picklerobject *self, PyObject *iter)
PyObject *obj;
PyObject *slice[BATCHSIZE];
int i, n;
+ self->nesting++;
static char append = APPEND;
static char appends = APPENDS;
@@ -1658,6 +1659,7 @@ batch_dict(Picklerobject *self, PyObject *iter)
PyObject *p;
PyObject *slice[BATCHSIZE];
int i, n;
+ self->nesting++;
static char setitem = SETITEM;
static char setitems = SETITEMS;