Merge pull request #4806 from nqbit/msan_bug

Initialize offset memory for PyImagingPhotoPut
This commit is contained in:
Hugo van Kemenade 2020-10-14 17:38:17 +03:00 committed by GitHub
commit 14643d5746
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,7 @@ PyImagingPhotoPut(ClientData clientdata, Tcl_Interp* interp,
if (strcmp(im->mode, "1") == 0 || strcmp(im->mode, "L") == 0) {
block.pixelSize = 1;
block.offset[0] = block.offset[1] = block.offset[2] = 0;
block.offset[0] = block.offset[1] = block.offset[2] = block.offset[3] = 0;
} else if (strncmp(im->mode, "RGB", 3) == 0) {
block.pixelSize = 4;
block.offset[0] = 0;