summaryrefslogtreecommitdiffstats
path: root/Modules/_struct.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-09-30 02:18:09 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-09-30 02:18:09 (GMT)
commita8a93042dcfb6673da1a67726e5028c7582099ea (patch)
treec8e097854723da1cddf587321661d705cba98263 /Modules/_struct.c
parentcb9a5517d0806a55aa9432b1305537dd8f5c062b (diff)
downloadcpython-a8a93042dcfb6673da1a67726e5028c7582099ea.zip
cpython-a8a93042dcfb6673da1a67726e5028c7582099ea.tar.gz
cpython-a8a93042dcfb6673da1a67726e5028c7582099ea.tar.bz2
Merged revisions 66693 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r66693 | benjamin.peterson | 2008-09-29 21:11:07 -0500 (Mon, 29 Sep 2008) | 4 lines Victor Stinner's patches to check the return result of PyLong_Ssize_t reviewed by Amaury ........
Diffstat (limited to 'Modules/_struct.c')
-rw-r--r--Modules/_struct.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 4a257c0..ac70f43 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -1786,6 +1786,8 @@ s_pack_into(PyObject *self, PyObject *args)
/* Extract the offset from the first argument */
offset = PyLong_AsSsize_t(PyTuple_GET_ITEM(args, 1));
+ if (offset == -1 && PyErr_Occurred())
+ return NULL;
/* Support negative offsets. */
if (offset < 0)