diff options
author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-11-11 10:55:12 (GMT) |
---|---|---|
committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-11-11 10:55:12 (GMT) |
commit | e16997693c78c7f7e8e63113f5f5bcd95178abec (patch) | |
tree | e477b04fc5a7de52d3dafe175c0a6a73b4145483 /generic | |
parent | def1607a44117b5f6c8815650ecd208f0be296c8 (diff) | |
download | tk-e16997693c78c7f7e8e63113f5f5bcd95178abec.zip tk-e16997693c78c7f7e8e63113f5f5bcd95178abec.tar.gz tk-e16997693c78c7f7e8e63113f5f5bcd95178abec.tar.bz2 |
Fix uninitialized variable in 16-bit PPM handling. [1632447] follow-up.
Diffstat (limited to 'generic')
-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 d71db25..ddd16b2 100644 --- a/generic/tkImgPPM.c +++ b/generic/tkImgPPM.c @@ -595,7 +595,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; |