mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
Merge pull request #3917 from cgohlke/patch-2
Fix potential null pointer is passed into memcpy
This commit is contained in:
commit
f2d0106a9b
|
@ -194,6 +194,9 @@ int ReadTile(TIFF* tiff, UINT32 col, UINT32 row, UINT32* buffer) {
|
|||
}
|
||||
|
||||
swap_line = (UINT32*)malloc(swap_line_size);
|
||||
if (swap_line == NULL) {
|
||||
return -1;
|
||||
}
|
||||
/*
|
||||
* For some reason the TIFFReadRGBATile() function chooses the
|
||||
* lower left corner as the origin. Vertically mirror scanlines.
|
||||
|
|
Loading…
Reference in New Issue
Block a user