diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-02 15:57:49 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-02 15:57:49 +0000 |
commit | 2aec786828e22fe45d373c5c42853d8518ba9be8 (patch) | |
tree | e8c422e3796b56bfb4bf2841a59076acc1443599 /plugins/Dbx_mdb | |
parent | 336401d1771d74771246ac7e3ec6e3b1e562a98e (diff) |
dbx_lmdb: buffer overrun fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@16393 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb')
-rw-r--r-- | plugins/Dbx_mdb/src/dbmodulechain.cpp | 4 |
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);
|