summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPNG.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkImgPNG.c')
-rw-r--r--generic/tkImgPNG.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c
index d6a706a..8146e33 100644
--- a/generic/tkImgPNG.c
+++ b/generic/tkImgPNG.c
@@ -10,6 +10,7 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
+#include "assert.h"
#include "tkInt.h"
#define PNG_INT32(a,b,c,d) \
@@ -1880,6 +1881,8 @@ DecodeLine(
* Calculate offset into pixelPtr for the first pixel of the line.
*/
+ assert(pngPtr->currentLine < pngPtr->block.height);
+
offset = pngPtr->currentLine * pngPtr->block.pitch;
/*