diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/bz2module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/bz2module.c b/Modules/bz2module.c index ee2186e..954c914 100644 --- a/Modules/bz2module.c +++ b/Modules/bz2module.c @@ -431,7 +431,7 @@ BZ2File_read(BZ2FileObject *self, PyObject *args) goto cleanup; } ret = PyBytes_FromStringAndSize((char *)NULL, buffersize); - if (ret == NULL) + if (ret == NULL || buffersize == 0) goto cleanup; bytesread = 0; |