[PATCH] comctl32: avoid integer overflow (Coverity)
Marcus Meissner
marcus at jet.franken.de
Tue Apr 7 00:09:28 CDT 2015
CID 1292976 Unintentional integer overflow
suggests casting one of the right hand side to ULONGULONG
already, otherwise the multiplication can overflow.
---
dlls/comctl32/dsa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/dsa.c b/dlls/comctl32/dsa.c
index 32f9926..a73a54a 100644
--- a/dlls/comctl32/dsa.c
+++ b/dlls/comctl32/dsa.c
@@ -488,5 +488,5 @@ ULONGLONG WINAPI DSA_GetSize(HDSA hdsa)
if (!hdsa) return 0;
- return sizeof(*hdsa) + hdsa->nMaxCount*hdsa->nItemSize;
+ return sizeof(*hdsa) + (ULONGLONG)hdsa->nMaxCount*hdsa->nItemSize;
}
--
1.8.4.5
More information about the wine-patches
mailing list