From d308658d4816066a495a742890b63aa881f98e9b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Sep 2017 15:03:12 +0300 Subject: fix for buffer length --- plugins/MenuItemEx/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/MenuItemEx/src') diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 5c3f3873df..0f6b58fe2e 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -272,7 +272,7 @@ void GetID(MCONTACT hContact, LPSTR szProto, LPSTR szID, size_t dwIDSize) else if (dbv_uniqueid.type == DBVT_WORD) mir_snprintf(szID, dwIDSize, "%u", dbv_uniqueid.wVal); else if (dbv_uniqueid.type == DBVT_BLOB) { - CMStringA tmp(' ', dbv_uniqueid.cpbVal*2); + CMStringA tmp(' ', dbv_uniqueid.cpbVal*2+1); bin2hex(dbv_uniqueid.pbVal, dbv_uniqueid.cpbVal, tmp.GetBuffer()); strncpy_s(szID, dwIDSize, tmp, _TRUNCATE); } -- cgit v1.2.3