From f6aef20f214163655e9bd3dba3e6bd0d22edd1c8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 29 Oct 2024 11:28:18 +0300 Subject: fixes #4762 (occasional crash in the core) --- src/mir_app/src/protocols.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mir_app/src/protocols.cpp b/src/mir_app/src/protocols.cpp index 9acb77dada..aa4cf6bee7 100644 --- a/src/mir_app/src/protocols.cpp +++ b/src/mir_app/src/protocols.cpp @@ -284,7 +284,7 @@ HICON Proto_GetIcon(PROTO_INTERFACE *ppro, int iconIndex) MIR_APP_DLL(PROTOACCOUNT*) Proto_GetAccount(const char *accName) { - if (accName == nullptr) + if (accName == nullptr || IsBadReadPtr(accName, 1)) return nullptr; return g_arAccounts.find((PROTOACCOUNT*)&accName); -- cgit v1.2.3