Merge pull request #3917 from cgohlke/patch-2

Fix potential null pointer is passed into memcpy
This commit is contained in:
Hugo 2019-06-26 12:09:22 +03:00 committed by GitHub
commit f2d0106a9b
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.