diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-11-11 10:56:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-11-11 10:56:00 (GMT) |
commit | c6b785767e244966fb524472a0b23172b911901e (patch) | |
tree | d320701266ac321c2fafb0616dc299a8512731c1 | |
parent | 8257004eff7efcb4440402734dfd667354f89932 (diff) | |
parent | f433b49a47c41cb546fec64135779377f784843c (diff) | |
download | tk-c6b785767e244966fb524472a0b23172b911901e.zip tk-c6b785767e244966fb524472a0b23172b911901e.tar.gz tk-c6b785767e244966fb524472a0b23172b911901e.tar.bz2 |
Fix uninitialized variable in 16-bit PPM handling. [1632447] follow-up.
-rw-r--r-- | generic/tkImgPPM.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkImgPPM.c b/generic/tkImgPPM.c index 79f7b25..6f084f0 100644 --- a/generic/tkImgPPM.c +++ b/generic/tkImgPPM.c @@ -603,7 +603,7 @@ StringReadPPM( unsigned char *p; unsigned int value; - for (p = pixelPtr; count > 0; count--, p += 2) { + for (p = pixelPtr,count=nBytes; count > 1; count-=2, p += 2) { value = ((unsigned int) p[0]) * 256 + ((unsigned int) p[1]); value = value * 255 / maxIntensity; p[0] = p[1] = (unsigned char) value; |