From 8c2746974921d380ed7e64ed5217a42262f1e965 Mon Sep 17 00:00:00 2001
From: George Hazan <ghazan@miranda.im>
Date: Wed, 17 Oct 2018 23:00:41 +0300
Subject: crash fix

---
 plugins/Dbx_sqlite/src/dbevents.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index 762343c4b9..db8260eec9 100644
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -319,7 +319,7 @@ BOOL CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
 	dbei->cbBlob = cbBlob;
 	if (bytesToCopy && dbei->pBlob) {
 		BYTE *data = (BYTE*)sqlite3_column_blob(stmt, 5);
-		memcpy(dbei->pBlob, data, dbei->cbBlob);
+		memcpy(dbei->pBlob, data, bytesToCopy);
 	}
 	sqlite3_reset(stmt);
 	return 0;
-- 
cgit v1.2.3