mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +03:00
Fix potential null pointer is passed into memcpy
This commit is contained in:
parent
ea570a8c5b
commit
a78341e26c
|
@ -194,6 +194,9 @@ int ReadTile(TIFF* tiff, UINT32 col, UINT32 row, UINT32* buffer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
swap_line = (UINT32*)malloc(swap_line_size);
|
swap_line = (UINT32*)malloc(swap_line_size);
|
||||||
|
if (swap_line == NULL) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* For some reason the TIFFReadRGBATile() function chooses the
|
* For some reason the TIFFReadRGBATile() function chooses the
|
||||||
* lower left corner as the origin. Vertically mirror scanlines.
|
* lower left corner as the origin. Vertically mirror scanlines.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user