Skip to content

Commit 82beb20

Browse files
author
Cristy
committed
Initialize index channel to get expected results from the stegano coder
1 parent 803bc34 commit 82beb20

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
https://github.com/ImageMagick/ImageMagick/issues/229).
44
* Prevent possible buffer overflow when reading TIFF images (bug report from
55
Shi Pu of MS509 Team).
6+
* Initialize index channel to get expected results from the stegano coder.
67

78
2016-07-11 7.0.2-4 Cristy <quetzlzacatenango@image...>
89
* Release ImageMagick version 7.0.2-4, GIT revision 18591:50debe5:20160710.

coders/stegano.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,19 @@ static Image *ReadSTEGANOImage(const ImageInfo *image_info,
159159
status=SetImageExtent(image,image->columns,image->rows,exception);
160160
if (status == MagickFalse)
161161
return(DestroyImageList(image));
162+
for (y=0; y < (ssize_t) image->rows; y++)
163+
{
164+
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
165+
if (q == (Quantum *) NULL)
166+
break;
167+
for (x=0; x < (ssize_t) image->columns; x++)
168+
{
169+
SetPixelIndex(image,0,q);
170+
q+=GetPixelChannels(image);
171+
}
172+
if (SyncAuthenticPixels(image,exception) == MagickFalse)
173+
break;
174+
}
162175
/*
163176
Get hidden watermark from low-order bits of image.
164177
*/

0 commit comments

Comments
 (0)