summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);