summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_mdb/src')
-rw-r--r--plugins/Dbx_mdb/src/dbmodulechain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Dbx_mdb/src/dbmodulechain.cpp b/plugins/Dbx_mdb/src/dbmodulechain.cpp
index e18179ebf6..5b83d02804 100644
--- a/plugins/Dbx_mdb/src/dbmodulechain.cpp
+++ b/plugins/Dbx_mdb/src/dbmodulechain.cpp
@@ -96,12 +96,12 @@ DWORD CDbxMdb::GetModuleNameOfs(const char *szName)
// need to create the module name
int newIdx = ++m_maxModuleID;
- DBModuleName *pmod = (DBModuleName*)_alloca(sizeof(DBModuleName) + nameLen);
+ DBModuleName *pmod = (DBModuleName*)_alloca(sizeof(DBModuleName) + nameLen + 1);
pmod->dwSignature = DBMODULENAME_SIGNATURE;
pmod->cbName = (char)nameLen;
strcpy(pmod->name, szName);
- MDB_val key = { sizeof(int), &newIdx }, data = { sizeof(DBModuleName) + nameLen, pmod };
+ MDB_val key = { sizeof(int), &newIdx }, data = { sizeof(DBModuleName) + nameLen + 1, pmod };
for (;; Remap()) {
txn_ptr trnlck(m_pMdbEnv);