[PATCH 2/2] comctl32: EnumMRUListA/W fix getting list size by negative item pos

Peter Oberndorfer kumbayo84 at arcor.de
Wed Dec 5 13:10:55 CST 2007


---
the bounds check would bail out early when -1 is passed as nItemPos
the problem is comparing a signed with a unsigned number
by moving the <0 check ahead of the out of bounds check
the early bail out can be avoided

another way to fix it would be to make the cursize a INT instead of a DWORD

 dlls/comctl32/comctl32undoc.c |    4 ++--
 dlls/comctl32/tests/mru.c     |    2 --
 2 files changed, 2 insertions(+), 4 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 77c4120887b29b0b67a373ea9fadc7ed1dbd3569.diff
Type: text/x-patch
Size: 1834 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071205/b7770b9e/attachment.bin 


More information about the wine-patches mailing list