Fix potential null pointer is passed into memcpy

This commit is contained in:
Christoph Gohlke 2019-06-25 14:23:20 -07:00 committed by GitHub
parent ea570a8c5b
commit a78341e26c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.