diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Setup.dist | 6 | ||||
-rw-r--r-- | Modules/_fileio.c | 1 | ||||
-rw-r--r-- | Modules/audioop.c | 2 | ||||
-rw-r--r-- | Modules/bz2module.c | 1 | ||||
-rw-r--r-- | Modules/cmathmodule.c | 6 | ||||
-rw-r--r-- | Modules/timemodule.c | 2 |
6 files changed, 10 insertions, 8 deletions
diff --git a/Modules/Setup.dist b/Modules/Setup.dist index a790556..d2c8971 100644 --- a/Modules/Setup.dist +++ b/Modules/Setup.dist @@ -228,9 +228,11 @@ _symtable symtablemodule.c #_md5 md5module.c md5.c -# The _sha module implements the SHA checksum algorithm. -# (NIST's Secure Hash Algorithm.) +# The _sha module implements the SHA checksum algorithms. +# (NIST's Secure Hash Algorithms.) #_sha shamodule.c +#_sha256 sha256module.c +#_sha512 sha512module.c # The _tkinter module. diff --git a/Modules/_fileio.c b/Modules/_fileio.c index 71553ba..f520f0c 100644 --- a/Modules/_fileio.c +++ b/Modules/_fileio.c @@ -278,7 +278,6 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds) ret = -1; done: - PyMem_Free(name); return ret; } diff --git a/Modules/audioop.c b/Modules/audioop.c index c660501..c54e512 100644 --- a/Modules/audioop.c +++ b/Modules/audioop.c @@ -575,7 +575,7 @@ audioop_findmax(PyObject *self, PyObject *args) } len1 >>= 1; - if ( len1 < len2 ) { + if ( len2 < 0 || len1 < len2 ) { PyErr_SetString(AudioopError, "Input sample should be longer"); return 0; } diff --git a/Modules/bz2module.c b/Modules/bz2module.c index db10f31..562198b 100644 --- a/Modules/bz2module.c +++ b/Modules/bz2module.c @@ -1264,6 +1264,7 @@ BZ2File_iternext(BZ2FileObject *self) PyBytesObject* ret; ACQUIRE_LOCK(self); if (self->mode == MODE_CLOSED) { + RELEASE_LOCK(self); PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); return NULL; diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c index eec618e..67df5c3 100644 --- a/Modules/cmathmodule.c +++ b/Modules/cmathmodule.c @@ -839,8 +839,10 @@ cmath_log(PyObject *self, PyObject *args) errno = 0; PyFPE_START_PROTECT("complex function", return 0) x = c_log(x); - if (PyTuple_GET_SIZE(args) == 2) - x = c_quot(x, c_log(y)); + if (PyTuple_GET_SIZE(args) == 2) { + y = c_log(y); + x = c_quot(x, y); + } PyFPE_END_PROTECT(x) if (errno != 0) return math_error(); diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 1954d0c..d2817fb 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -641,8 +641,6 @@ time_mktime(PyObject *self, PyObject *tup) { struct tm buf; time_t tt; - tt = time(&tt); - buf = *localtime(&tt); if (!gettmarg(tup, &buf)) return NULL; tt = mktime(&buf); |