https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ade0e7b04ede20a13a512780ada2631fd645416

commit 9ade0e7b04ede20a13a512780ada2631fd645416
Author:     Bișoc George <[email protected]>
AuthorDate: Fri Jun 14 20:52:41 2019 +0200
Commit:     Hermès Bélusca-Maïto <[email protected]>
CommitDate: Sat Jun 15 18:12:54 2019 +0200

    [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);  

Reply via email to