PATCH: LISTVIEW_GetItemT() and LISTVIEW_InsertItemT() read and write too much memory

Adam Gundy arg at cyberscience.com
Fri May 2 11:12:54 CDT 2003


The LISTVIEW_GetItemT() and LISTVIEW_InsertItemT() functions
read and write too much memory at *lpLPVItem. This is because of
size of the structure was increased - code compiled with older headers
(eg MSVC6) will still be using the smaller structures.

Reading too much is _fairly_ safe - it just makes valgrind shout. Writing
too much tends to trash the stack etc.

The attached patch checks the mask flags in the structure to determine
how much memory to read/write.


Seeya,
 Adam
--
Real Programmers don't comment their code. If it was hard to write,
it should be hard to read, and even harder to modify.
These are all my own opinions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: listview.patch
Type: application/octet-stream
Size: 2645 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20030502/fc0bb30d/listview.obj


More information about the wine-patches mailing list