summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2016-01-29 20:30:51 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2016-01-29 20:30:51 +0000
commitac2a8aa05bea51e3496682242d3bbe5c25901581 (patch)
tree583e4045ac915d5e1298b334158746191bbc6552 /src
parent5567447ef7efee855e5dd88c5b31625e2182f664 (diff)
Core:
- Attempt to fix uninitialized memory git-svn-id: http://svn.miranda-ng.org/main/trunk@16188 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/icolib.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mir_app/src/icolib.cpp b/src/mir_app/src/icolib.cpp
index e22acb338d..816b9edfd0 100644
--- a/src/mir_app/src/icolib.cpp
+++ b/src/mir_app/src/icolib.cpp
@@ -232,8 +232,7 @@ int IconSourceItem::getIconData(HICON icon)
if (!GetIconInfo(icon, &iconInfo))
return 1; // Failure
- int MonoInfoSize, ColorInfoSize;
- int MonoBitsSize, ColorBitsSize;
+ int MonoInfoSize, ColorInfoSize, MonoBitsSize, ColorBitsSize;
if (InternalGetDIBSizes(iconInfo.hbmMask, &MonoInfoSize, &MonoBitsSize)
|| InternalGetDIBSizes(iconInfo.hbmColor, &ColorInfoSize, &ColorBitsSize)) {
DeleteObject(iconInfo.hbmColor);
@@ -242,10 +241,10 @@ int IconSourceItem::getIconData(HICON icon)
}
mir_ptr<BYTE>
- MonoInfo((BYTE*)mir_alloc(MonoInfoSize)),
- MonoBits((BYTE*)mir_alloc(MonoBitsSize)),
- ColorInfo((BYTE*)mir_alloc(ColorInfoSize)),
- ColorBits((BYTE*)mir_alloc(ColorBitsSize));
+ MonoInfo((BYTE*)mir_calloc(MonoInfoSize)),
+ MonoBits((BYTE*)mir_calloc(MonoBitsSize)),
+ ColorInfo((BYTE*)mir_calloc(ColorInfoSize)),
+ ColorBits((BYTE*)mir_calloc(ColorBitsSize));
if (InternalGetDIB(iconInfo.hbmMask, 0, MonoInfo, MonoBits)
|| InternalGetDIB(iconInfo.hbmColor, 0, ColorInfo, ColorBits)) {