summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-10-29 11:28:18 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-10-29 11:28:18 +0300
commitf6aef20f214163655e9bd3dba3e6bd0d22edd1c8 (patch)
tree3f02066573212a3eede2df0ce3779b5ea02cc322
parent692e44fc2e2f5f419d701dc65279557a973a2b40 (diff)
fixes #4762 (occasional crash in the core)
-rw-r--r--src/mir_app/src/protocols.cpp2
1 files changed, 1 insertions, 1 deletions
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);