commit | 75c3d6ff092f67d1c5aff1d05fcdef1ef1a5bae3 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Fri Feb 13 11:01:07 2009 +0000 |
committer | Georg Brandl <georg@python.org> | Fri Feb 13 11:01:07 2009 +0000 |
tree | 6b94d7ef6c2383c31d936c10e31c457656ee6088 | |
parent | c8dcfb6cece2da41d7b86879af1f4b81f98d70df [diff] [blame] |
#3694: fix an "XXX undetected error" leak in struct.
diff --git a/Modules/_struct.c b/Modules/_struct.c index 94cb303..57441c4 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c
@@ -1785,7 +1785,7 @@ assert( buffer_len >= 0 ); /* Extract the offset from the first argument */ - offset = PyLong_AsSsize_t(PyTuple_GET_ITEM(args, 1)); + offset = PyNumber_AsSsize_t(PyTuple_GET_ITEM(args, 1), PyExc_IndexError); if (offset == -1 && PyErr_Occurred()) return NULL;