Skip to content

Commit

Permalink
Merge pull request #4806 from nqbit/msan_bug
Browse files Browse the repository at this point in the history
Initialize offset memory for PyImagingPhotoPut
  • Loading branch information
hugovk authored Oct 14, 2020
2 parents e58baa0 + 1743ac4 commit 14643d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tk/tkImaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 14643d5

Please sign in to comment.