diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-21 00:46:21 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-21 00:46:21 (GMT) |
commit | 901071bde5eda2189cd396095bbb8934d4fa66b3 (patch) | |
tree | 185a3c6140905b2a199006755b8c883ce3d7774d /Modules | |
parent | 0e5edf5afd43b522f63b318b6d982579395ab6af (diff) | |
download | cpython-901071bde5eda2189cd396095bbb8934d4fa66b3.zip cpython-901071bde5eda2189cd396095bbb8934d4fa66b3.tar.gz cpython-901071bde5eda2189cd396095bbb8934d4fa66b3.tar.bz2 |
Fixed #1372: zlibmodule.c: int overflow in PyZlib_decompress
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/zlibmodule.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index 43f435a..da26d07 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -197,10 +197,11 @@ PyZlib_decompress(PyObject *self, PyObject *args) PyObject *result_str; Byte *input; int length, err; - int wsize=DEF_WBITS, r_strlen=DEFAULTALLOC; + int wsize=DEF_WBITS; + Py_ssize_t r_strlen=DEFAULTALLOC; z_stream zst; - if (!PyArg_ParseTuple(args, "s#|ii:decompress", + if (!PyArg_ParseTuple(args, "s#|in:decompress", &input, &length, &wsize, &r_strlen)) return NULL; |