Commit f760079a authored by Eberhard Beilharz's avatar Eberhard Beilharz Committed by Alexandre Julliard

comctl32/imagelist: Fix crash with large number of images.

Fix a crash that occurred when reading a imagelist with a large number of images. In the particular case we read a cMaxImage value of 1032, but allocated only 40 or so images. This lead to memory corruption in ImageList_Read. This change allows to run TntConnect. Signed-off-by: 's avatarEberhard Beilharz <eb1@sil.org> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 64addb51
......@@ -2273,7 +2273,7 @@ HIMAGELIST WINAPI ImageList_Read(IStream *pstm)
TRACE("cx %u, cy %u, flags 0x%04x, cCurImage %u, cMaxImage %u\n",
ilHead.cx, ilHead.cy, ilHead.flags, ilHead.cCurImage, ilHead.cMaxImage);
himl = ImageList_Create(ilHead.cx, ilHead.cy, ilHead.flags, ilHead.cCurImage, ilHead.cMaxImage);
himl = ImageList_Create(ilHead.cx, ilHead.cy, ilHead.flags, ilHead.cMaxImage, ilHead.cGrow);
if (!himl)
return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment