diff --git a/Tiano/EfiCompress.c b/Tiano/EfiCompress.c
index ab8f06f..1437c05 100644
--- a/Tiano/EfiCompress.c
+++ b/Tiano/EfiCompress.c
@@ -416,6 +416,9 @@ Returns:
UINT32 i;
mText = malloc (WNDSIZ * 2 + MAXMATCH);
+ if (!mText)
+ return ERR_OUT_OF_MEMORY;
+
for (i = 0 ; i < WNDSIZ * 2 + MAXMATCH; i ++) {
mText[i] = 0;
}
diff --git a/uefitool.cpp b/uefitool.cpp
index 6f84573..3cb3cf7 100644
--- a/uefitool.cpp
+++ b/uefitool.cpp
@@ -289,7 +289,7 @@ UINT8* UEFITool::parseRegion(const QByteArray & flashImage, UINT8 regionSubtype,
UINT32 regionSize = calculateRegionSize(regionBase, regionLimit);
// Populate descriptor map
- FLASH_DESCRIPTOR_MAP* descriptor_map = (FLASH_DESCRIPTOR_MAP*) flashImage.constData() + sizeof(FLASH_DESCRIPTOR_HEADER);
+ FLASH_DESCRIPTOR_MAP* descriptor_map = (FLASH_DESCRIPTOR_MAP*) (flashImage.constData() + sizeof(FLASH_DESCRIPTOR_HEADER));
// Determine presence of 2 flash chips
bool twoChips = descriptor_map->NumberOfFlashChips;
@@ -809,7 +809,9 @@ UINT8 UEFITool::parseFile(const QByteArray & file, UINT8 revision, bool erasePol
if (LzmaGetInfo(data, dataSize, &decompressedSize) != ERR_SUCCESS)
debug(tr("LzmaGetInfo failed"));
}
+
decompressed = new UINT8[decompressedSize];
+
// Decompress section data
if (LzmaDecompress(data, dataSize, decompressed) != ERR_SUCCESS)
debug(tr("LzmaDecompress failed"));
diff --git a/uefitool.pro b/uefitool.pro
index 7a60b4b..3a95d2f 100644
--- a/uefitool.pro
+++ b/uefitool.pro
@@ -22,7 +22,8 @@ HEADERS += uefitool.h \
basetypes.h \
descriptor.h \
ffs.h \
- treeitem.h \
+ treeitem.h \
+ treeitemtypes.h \
treemodel.h \
LZMA/LzmaCompress.h \
LZMA/LzmaDecompress.h \
diff --git a/uefitool.ui b/uefitool.ui
index 5444e93..74f684d 100644
--- a/uefitool.ui
+++ b/uefitool.ui
@@ -20,7 +20,7 @@
true
- UEFITool 0.2.2
+ UEFITool 0.2.3