diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-14 10:16:32 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-14 10:16:32 (GMT) |
commit | d3accd1f1590ad5fd9a5bac5f611912c8dd9809c (patch) | |
tree | 012ffc7a3b5d2f0f6dfbc6c40a422558b63a63db /generic/tkImgPhoto.c | |
parent | 8de6df287f0801fc32a7eab9c589ff91088a0f9e (diff) | |
parent | dbbe0a62aec26cbb25226ef18e9c77910f152efb (diff) | |
download | tk-d3accd1f1590ad5fd9a5bac5f611912c8dd9809c.zip tk-d3accd1f1590ad5fd9a5bac5f611912c8dd9809c.tar.gz tk-d3accd1f1590ad5fd9a5bac5f611912c8dd9809c.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r-- | generic/tkImgPhoto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 647eb17..0330ade 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -3263,8 +3263,8 @@ Tk_PhotoPutBlock( */ sourceBlock = *blockPtr; memToFree = NULL; - if (sourceBlock.pixelPtr >= modelPtr->pix32 - && sourceBlock.pixelPtr <= modelPtr->pix32 + modelPtr->width + if (modelPtr->pix32 && (sourceBlock.pixelPtr >= modelPtr->pix32) + && (sourceBlock.pixelPtr < modelPtr->pix32 + modelPtr->width) * modelPtr->height * 4) { /* * Fix 5c51be6411: avoid reading @@ -3709,8 +3709,8 @@ Tk_PhotoPutZoomedBlock( */ sourceBlock = *blockPtr; memToFree = NULL; - if (sourceBlock.pixelPtr >= modelPtr->pix32 - && sourceBlock.pixelPtr <= modelPtr->pix32 + modelPtr->width + if (modelPtr->pix32 && (sourceBlock.pixelPtr >= modelPtr->pix32) + && (sourceBlock.pixelPtr < modelPtr->pix32 + modelPtr->width) * modelPtr->height * 4) { /* * Fix 5c51be6411: avoid reading |