Skip to content

Commit

Permalink
Merge pull request #3917 from cgohlke/patch-2
Browse files Browse the repository at this point in the history
Fix potential null pointer is passed into memcpy
  • Loading branch information
hugovk committed Jun 26, 2019
2 parents 2aaacc8 + a78341e commit f2d0106
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libImaging/TiffDecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f2d0106

Please sign in to comment.