mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-23 19:44:13 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
8a54f58ac6
commit
aa8d87696b
|
@ -4131,7 +4131,7 @@ _set_blocks_max(PyObject *self, PyObject *args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((unsigned long)blocks_max >
|
if ((unsigned long)blocks_max >
|
||||||
SIZE_MAX / sizeof(ImagingDefaultArena.blocks_pool[0])) {
|
SIZE_MAX / sizeof(ImagingDefaultArena.blocks_pool[0])) {
|
||||||
PyErr_SetString(PyExc_ValueError, "blocks_max is too large");
|
PyErr_SetString(PyExc_ValueError, "blocks_max is too large");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -506,7 +506,8 @@ ImagingNewInternal(const char *mode, int xsize, int ysize, int dirty) {
|
||||||
|
|
||||||
MUTEX_LOCK(&ImagingDefaultArena.mutex);
|
MUTEX_LOCK(&ImagingDefaultArena.mutex);
|
||||||
Imaging tmp = ImagingAllocateArray(
|
Imaging tmp = ImagingAllocateArray(
|
||||||
im, &ImagingDefaultArena, dirty, ImagingDefaultArena.block_size);
|
im, &ImagingDefaultArena, dirty, ImagingDefaultArena.block_size
|
||||||
|
);
|
||||||
MUTEX_UNLOCK(&ImagingDefaultArena.mutex);
|
MUTEX_UNLOCK(&ImagingDefaultArena.mutex);
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
return im;
|
return im;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user