From 17d8c0bb68eef6817c1f03a2abd5752e01b93ce9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 6 Feb 2017 22:21:47 +0300 Subject: fix for an array bounds overflow --- src/mir_app/src/proto_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index 6ba435414e..101907b263 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -251,7 +251,7 @@ static wchar_t *wszMimeTypes[] = MIR_APP_DLL(const wchar_t*) ProtoGetAvatarMimeType(int iFileType) { - if (iFileType >= 0 && iFileType <= _countof(wszMimeTypes)) + if (iFileType >= 0 && iFileType < _countof(wszMimeTypes)) return wszMimeTypes[iFileType]; return NULL; } -- cgit v1.2.3