From 9ade0e7b04ede20a13a512780ada2631fd645416 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bi=C8=99oc=20George?= Date: Fri, 14 Jun 2019 20:52:41 +0200 Subject: [PATCH 1/1] [MAGNIFY] Fix a string buffer misuage that led to division by zero exception. (#1655) The iZoom variable was wrongly initialized to zero because the _ttoi() called failed due to the fact the temporary string buffer was too small. --- base/applications/magnify/magnifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/applications/magnify/magnifier.c b/base/applications/magnify/magnifier.c index cfca2519914..13a0a3cd190 100644 --- a/base/applications/magnify/magnifier.c +++ b/base/applications/magnify/magnifier.c @@ -931,7 +931,7 @@ INT_PTR CALLBACK OptionsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPar if (HIWORD(wParam) == CBN_SELCHANGE) { HWND hCombo = GetDlgItem(hDlg,IDC_ZOOM); - LPCTSTR currentZoomValue = TEXT(""); + TCHAR currentZoomValue[2] = TEXT(""); /* Get index of current selection and the text of that selection */ int currentSelectionIndex = ComboBox_GetCurSel(hCombo); -- 2.17.1