summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES5
-rw-r--r--VERSION2
-rw-r--r--src/PEImage.cpp1
-rw-r--r--src/cv2pdb.cpp12
4 files changed, 16 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 9180174..b37d8de 100644
--- a/CHANGES
+++ b/CHANGES
@@ -264,3 +264,8 @@ unreleased Version 0.22
* translate S_UDT_V1 to V3 version
* translate S_BLOCK_V1 to V3 version
* remove "this" from delegate parameter list if inconsistent with procedure type
+
+2017-11-30 Version 0.43
+
+ * DWARF: fix crash with AUX data in symbol table
+ * improve reallocation strategy
diff --git a/VERSION b/VERSION
index 7630106..c56e31a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-VERSION = 0.42
+VERSION = 0.43
diff --git a/src/PEImage.cpp b/src/PEImage.cpp
index 2416ce4..a8fd11f 100644
--- a/src/PEImage.cpp
+++ b/src/PEImage.cpp
@@ -706,6 +706,7 @@ int PEImage::findSymbol(const char* name, unsigned long& off) const
off = sym->Value;
return bigobj ? ((IMAGE_SYMBOL_EX*)sym)->SectionNumber : sym->SectionNumber;
}
+ i += sym->NumberOfAuxSymbols;
}
return -1;
}
diff --git a/src/cv2pdb.cpp b/src/cv2pdb.cpp
index 34421b3..1ac48bd 100644
--- a/src/cv2pdb.cpp
+++ b/src/cv2pdb.cpp
@@ -859,8 +859,10 @@ void CV2PDB::checkUserTypeAlloc(int size, int add)
{
if (cbUserTypes + size >= allocUserTypes)
{
- allocUserTypes += size + add;
+ allocUserTypes = allocUserTypes * 4 / 3 + size + add;
userTypes = (BYTE*) realloc(userTypes, allocUserTypes);
+ if(!userTypes)
+ setError("out of memory");
}
}
@@ -878,8 +880,10 @@ void CV2PDB::checkGlobalTypeAlloc(int size, int add)
{
if (cbGlobalTypes + size > allocGlobalTypes)
{
- allocGlobalTypes += size + add;
+ allocGlobalTypes = allocGlobalTypes * 4 / 3 + size + add;
globalTypes = (unsigned char*) realloc(globalTypes, allocGlobalTypes);
+ if(!globalTypes)
+ setError("out of memory");
}
}
@@ -3310,8 +3314,10 @@ void CV2PDB::checkUdtSymbolAlloc(int size, int add)
{
if (cbUdtSymbols + size > allocUdtSymbols)
{
- allocUdtSymbols += size + add;
+ allocUdtSymbols = allocUdtSymbols * 4 / 3 + size + add;
udtSymbols = (BYTE*) realloc(udtSymbols, allocUdtSymbols);
+ if (!udtSymbols)
+ setError("out of memory");
}
}