diff options
Diffstat (limited to 'plugins/SecureIM')
-rw-r--r-- | plugins/SecureIM/src/commonheaders.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/SecureIM/src/commonheaders.cpp b/plugins/SecureIM/src/commonheaders.cpp index f4ad26a11c..98ce15c35f 100644 --- a/plugins/SecureIM/src/commonheaders.cpp +++ b/plugins/SecureIM/src/commonheaders.cpp @@ -25,7 +25,9 @@ mir_cs localQueueMutex; LPSTR myDBGetStringDecode(MCONTACT hContact, const char *szModule, const char *szSetting)
{
char *val = db_get_sa(hContact, szModule, szSetting);
- if (!val) return nullptr;
+ if (!val)
+ return nullptr;
+
size_t len = mir_strlen(val) + 64;
char *buf = (LPSTR)mir_alloc(len);
strncpy(buf, val, len); mir_free(val);
|