From cf7857d09fe50d5b290551780e23528cb889805b Mon Sep 17 00:00:00 2001 From: James Tabor Date: Tue, 9 Dec 2008 01:40:37 +0000 Subject: [PATCH] - New patch by hto: Suspicious code in User32.dll, see bug 3935. svn path=/trunk/; revision=37951 --- reactos/dll/win32/user32/windows/dialog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/user32/windows/dialog.c b/reactos/dll/win32/user32/windows/dialog.c index 4471180dd27..2932d4f95df 100644 --- a/reactos/dll/win32/user32/windows/dialog.c +++ b/reactos/dll/win32/user32/windows/dialog.c @@ -2035,7 +2035,7 @@ GetDlgItemTextA( LPSTR lpString, int nMaxCount) { - if (lpString && (lpString > 0)) lpString[0] = '\0'; + if (lpString && (nMaxCount > 0)) lpString[0] = '\0'; return (UINT)SendDlgItemMessageA( hDlg, nIDDlgItem, WM_GETTEXT, nMaxCount, (LPARAM)lpString ); } @@ -2051,7 +2051,7 @@ GetDlgItemTextW( LPWSTR lpString, int nMaxCount) { - if (lpString && (lpString > 0)) lpString[0] = '\0'; + if (lpString && (nMaxCount > 0)) lpString[0] = '\0'; return (UINT)SendDlgItemMessageW( hDlg, nIDDlgItem, WM_GETTEXT, nMaxCount, (LPARAM)lpString ); }