Module: wine Branch: master Commit: 43f283c0855d369690f1d747b051280f08b1c6bf URL: http://source.winehq.org/git/wine.git/?a=commit;h=43f283c0855d369690f1d747b0...
Author: Andrew Nguyen anguyen@codeweavers.com Date: Sat Apr 16 03:37:29 2011 -0500
krnl386.exe: Fix size calculation in GetSystemDirectory16.
---
dlls/krnl386.exe16/file.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/krnl386.exe16/file.c b/dlls/krnl386.exe16/file.c index 0a1098f..37c401a 100644 --- a/dlls/krnl386.exe16/file.c +++ b/dlls/krnl386.exe16/file.c @@ -628,11 +628,11 @@ UINT16 WINAPI GetWindowsDirectory16( LPSTR path, UINT16 count ) */ UINT16 WINAPI GetSystemDirectory16( LPSTR path, UINT16 count ) { - static const char * system16 = "\SYSTEM"; + static const char system16[] = "\SYSTEM"; char windir[MAX_PATH]; UINT16 len;
- len = GetWindowsDirectory16(windir, sizeof(windir) - sizeof(system16)) + sizeof(system16); + len = GetWindowsDirectory16(windir, sizeof(windir) - sizeof(system16) + 1) + sizeof(system16); if (count >= len) { lstrcpyA(path, windir);