Commit Graph

237 Commits

Author SHA1 Message Date
Michael Stefaniuc e4f66b0483 comctl32: Avoid using the comma operator.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:27:20 +01:00
Eberhard Beilharz f760079a71 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: Eberhard Beilharz <eb1@sil.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 19:43:12 +01:00
Nikolay Sivov 7625a1bb72 comctl32: Remove confusing comments.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-09 09:19:48 +01:00
Nikolay Sivov 3b3c25e17d comctl32/imagelist: Use HeapAlloc() wrappers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-02 14:42:38 +01:00
Alexandre Julliard 5dd9a1f00e comctl32/imagelist: Use the correct allocation size for the image mask.
Reported by Petru Florin Mihancea.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-11 19:55:30 +01:00
Huw Davies 92e999f34b comctl32: Don't create a masked imagelist if CLR_NONE is specified.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-20 17:10:47 +01:00
Huw Davies 2dd0fb880c comctl32: Correctly set the colour table for ILC_COLOR4 and ILC_COLOR8 imagelists.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:54 +01:00
Michael Stefaniuc 302ae44d8b comctl32: Remove an always true conditional expression.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 20:17:35 +09:00
Michael Stefaniuc 23132e6329 comctl32: Avoid using the LPSTREAM COM iface type.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-21 23:36:01 +09:00
Nikolay Sivov 833ff146c4 comctl32/imagelist: Simplify setting ImageList_DragEnter() return code.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-14 14:39:53 +09:00
Aric Stewart bcefe114e8 comctl32: ILC_COLORDDB imagelists can be created with 0 sizes.
Negative values are still invalid.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-20 22:19:29 +09:00
Nikolay Sivov 680ba9330e comctl32/imagelist: Use proper type for return variable (PVS-Studio).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-14 12:45:43 +09:00
Michael Stefaniuc 0a191f85ad comctl32: Don't start a new ImageList Drag if another one is ongoing. 2014-10-07 10:14:23 +02:00
Michael Stefaniuc 753de28cd5 comctl32: Correctly handle the ImageList index in BeginDrag(). 2014-10-07 10:14:21 +02:00
Michael Stefaniuc c1cd60957e comctl32: Functions using setjmp can never be inlined. 2014-06-23 10:18:04 +02:00
Nikolay Sivov f109a084e8 comctl32/imagelist: Update to IImageList2. 2014-06-12 13:19:06 +02:00
Alexandre Julliard 1dd04884d7 comctl32/imagelist: Correctly resize the alpha flags when clearing the image list. 2014-05-01 17:19:54 +02:00
Frédéric Delanoy 2e5cb7aac8 Assorted spelling/grammar fixes. 2014-04-30 18:34:20 +02:00
Andrey Gusev be367393c9 Assorted typos fixes. 2014-01-13 17:37:42 +01:00
Frédéric Delanoy cf8efbd252 comctl32: Use BOOL type where appropriate. 2013-10-04 12:46:17 +02:00
Michael Stefaniuc 2a39cb377a dlls: Replace the remaining CONSTs. 2013-09-25 11:49:20 +02:00
Daniel Jelinski cb8ce94e4d comctl32/imagelist: Use proper color format for merged image lists. 2013-03-08 19:35:21 +01:00
Daniel Jelinski 634d190478 comctl32/imagelist: Fixed merging of images without mask. 2013-03-04 11:39:00 +01:00
Daniel Jelinski 30d667bd25 comctl32/imagelist: Allow only one drag cursor. 2013-02-25 10:40:36 +01:00
Andrew Talbot 23fde785ee comctl32: Avoid signed-unsigned integer comparisons. 2013-01-02 13:35:52 +01:00
Nikolay Sivov 21897a9689 comctl32: Call interface methods properly. 2012-08-20 10:58:45 +02:00
Francois Gouget fac36c55e9 Assorted typo, spelling, wording and case fixes. 2012-05-15 16:26:43 +02:00
Thomas Faber 2fb139ffe7 comctl32: Fix MSVC build in imagelist.c. 2012-01-30 20:44:50 +01:00
Austin English 913fb67a5b comctl32: Fix a grammar error in comment. 2012-01-12 12:24:40 +01:00
Alexandre Julliard ff71cc2ca4 comctl32: Fix management of imagelist growth amount. 2012-01-11 17:47:31 +01:00
Alexandre Julliard e0fc985f32 comctl32: Use GetDIBits to retrieve the default color map for an imagelist DIB section. 2011-12-16 17:40:31 +01:00
Alexandre Julliard 40cf298c75 comctl32: Use DrawIconEx to copy icon bits and use the correct background color. 2011-12-16 17:40:30 +01:00
Alexandre Julliard 65b7eb2635 comctl32/tests: Add some more tests for ImageList_Write. 2011-12-16 17:40:27 +01:00
Alexandre Julliard 129f48a692 comctl32: Don't try to mask out the image for palette-based bitmaps. 2011-12-15 10:49:03 +01:00
Alexandre Julliard e6cf9fbcc2 comctl32: Merge imagelist definitions into the C file. 2011-11-21 11:47:24 +01:00
Alexandre Julliard ee462a7801 comctl32: Take the total bitmap size into account when reading a bottom-up image list. 2011-11-21 11:42:48 +01:00
Alexandre Julliard 73b9dc98eb comctl32: Setup the alpha channel also when reading an imagelist from a stream. 2011-11-15 22:11:15 +01:00
Alexandre Julliard 4c785235d0 comctl32: Add a couple of DIB helper functions for imagelists. 2011-11-15 22:10:45 +01:00
Michael Stefaniuc e443948d94 comctl32: Drop 'inline' from a function using sigsetjmp. 2011-10-31 23:53:41 +01:00
Huw Davies 66fe4e74cb comctl32: Initialise the mask's colour table. 2011-10-28 17:26:56 +02:00
Francois Gouget 01378c5c8e comctl32: Don't crash when getting a bad image list handle. 2011-09-19 18:32:51 +02:00
Alexandre Julliard bd3b0e4f70 comctl32: Simplify the DIB byte width computation. 2011-08-29 12:08:21 +02:00
Nikolay Sivov 6d1a3c6e6e comctl32/imagelist: Fix a couple of imagelist leaks (Valgrind). 2011-01-17 12:50:33 +01:00
Alexandre Julliard cca319d594 comctl32/imagelist: Don't change destination size in ImageList_Duplicate without corresponding allocation. 2011-01-10 12:41:38 +01:00
Alexandre Julliard 1826530974 comctl32: Use the appropriate color format when loading a DIB in ImageList_LoadImageW. 2010-10-14 17:54:51 +02:00
Nikolay Sivov acbd632039 comctl32/imagelist: Fix return value for IImageList_GetIconSize(). 2010-08-23 13:37:02 +02:00
Nikolay Sivov 9b77425f6a comctl32/imagelist: Fix return value from IImageList_SetBkColor(). 2010-08-23 13:37:02 +02:00
Nikolay Sivov 1c82b3491a comctl32/imagelist: Remove parameter check from IImageList_GetBkColor(). 2010-08-23 13:37:02 +02:00
Nikolay Sivov 6db1d3c5b9 comctl32/imagelist: Fix reference leak in IImageList_Clone(). 2010-08-23 13:37:01 +02:00
Nikolay Sivov 87847aa13c comctl32/imagelist: Remove parameter check from IImageList_Clone(). 2010-08-23 13:37:01 +02:00