From: Bișoc George Date: Fri, 14 Jun 2019 18:52:41 +0000 (+0200) Subject: [MAGNIFY] Fix a string buffer misuage that led to division by zero exception. (#1655) X-Git-Tag: 0.4.14-dev~779 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=9ade0e7b04ede20a13a512780ada2631fd645416;hp=b13990bd789a6e2bc9b0f9230cfeafefeba9c780 [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. --- 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);