mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
removed redundant check
This commit is contained in:
parent
8aedf8b1d8
commit
95f464f827
|
@ -98,17 +98,13 @@ ImagingPrecompute(int inSize, int outSize, struct filter *filterp,
|
|||
if (outSize > INT_MAX / (kmax * sizeof(double)))
|
||||
return 0;
|
||||
|
||||
// sizeof(double) should be greater than 0 as well
|
||||
if (outSize > INT_MAX / (2 * sizeof(int)))
|
||||
return 0;
|
||||
|
||||
/* coefficient buffer */
|
||||
/* malloc check ok, overflow checked above */
|
||||
kk = malloc(outSize * kmax * sizeof(double));
|
||||
if ( ! kk)
|
||||
return 0;
|
||||
|
||||
/* malloc check ok, overflow checked above */
|
||||
/* malloc check ok, kmax*sizeof(double) > 2*sizeof(int) */
|
||||
xbounds = malloc(outSize * 2 * sizeof(int));
|
||||
if ( ! xbounds) {
|
||||
free(kk);
|
||||
|
|
Loading…
Reference in New Issue
Block a user