diff options
author | sagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8> | 2009-06-05 09:56:53 (GMT) |
---|---|---|
committer | sagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8> | 2009-06-05 09:56:53 (GMT) |
commit | 5f8ec64d826f844ccc5e5f5b8767545e305a6e81 (patch) | |
tree | 40c40ee8520b4c7130da473976c4190f03f60acb /src | |
parent | 890a9b3e4f9384f8937646d49848aa669f93ed8e (diff) | |
download | cv2pdb-5f8ec64d826f844ccc5e5f5b8767545e305a6e81.zip cv2pdb-5f8ec64d826f844ccc5e5f5b8767545e305a6e81.tar.gz cv2pdb-5f8ec64d826f844ccc5e5f5b8767545e305a6e81.tar.bz2 |
v0.4: fix crash when long is used as index or element type of dynamic or associative arrays
Diffstat (limited to 'src')
-rw-r--r-- | src/cv2pdb.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/cv2pdb.cpp b/src/cv2pdb.cpp index f2ead36..49cb158 100644 --- a/src/cv2pdb.cpp +++ b/src/cv2pdb.cpp @@ -1079,7 +1079,7 @@ bool CV2PDB::nameOfAssocArray(int indexType, int elemType, char* name, int maxle bool CV2PDB::nameOfDelegate(int thisType, int funcType, char* name, int maxlen) { - strcat(name, "delegate "); + strcpy(name, "delegate "); int len = strlen(name); if (!nameOfType(funcType, name + len, maxlen - len)) return false; @@ -1101,6 +1101,9 @@ bool CV2PDB::nameOfOEMType(codeview_oem_type* oem, char* name, int maxlen) const char* CV2PDB::appendDynamicArray(int indexType, int elemType) { + indexType = translateType(indexType); + elemType = translateType(elemType); + codeview_reftype* rdtype;
codeview_type* dtype; @@ -1173,6 +1176,9 @@ const char* CV2PDB::appendAssocArray(int keyType, int elemType) // elemType value;
// };
+ keyType = translateType(keyType); + elemType = translateType(elemType); + codeview_reftype* rdtype;
codeview_type* dtype; codeview_fieldtype* dfieldtype; @@ -1297,6 +1303,9 @@ const char* CV2PDB::appendAssocArray(int keyType, int elemType) const char* CV2PDB::appendDelegate(int thisType, int funcType) { + thisType = translateType(thisType); + funcType = translateType(funcType); + codeview_reftype* rdtype;
codeview_type* dtype; @@ -1735,6 +1744,8 @@ bool CV2PDB::addTypes() int rc = mod->AddTypes(globalTypes, cb); if (rc <= 0) return setError("cannot add type info to module"); + // does it make sense to add symbols more than once? + // break; } } return true; |