[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690
Alexandre Julliard
julliard at winehq.org
Sun Jun 17 20:03:41 UTC 2012
The following commit has been merged in the wheezy branch:
commit 283533dba726d9e58df01bc6bf5bd1361421e9d5
Author: Owen Rudge <owen at owenrudge.net>
Date: Mon May 14 15:25:03 2012 +0100
user32: Return Unicode length instead of ANSI in GetUserObjectInformationA.
(cherry picked from commit fecde1ead8260ddb89b74c00b367721cccd76173)
diff --git a/dlls/user32/winstation.c b/dlls/user32/winstation.c
index 770245d..96b51179 100644
--- a/dlls/user32/winstation.c
+++ b/dlls/user32/winstation.c
@@ -477,13 +477,17 @@ BOOL WINAPI GetUserObjectInformationA( HANDLE handle, INT index, LPVOID info, DW
if (index == UOI_TYPE || index == UOI_NAME)
{
WCHAR buffer[MAX_PATH];
- DWORD lenA;
+ DWORD lenA, lenW;
- if (!GetUserObjectInformationW( handle, index, buffer, sizeof(buffer), NULL )) return FALSE;
+ if (!GetUserObjectInformationW( handle, index, buffer, sizeof(buffer), &lenW )) return FALSE;
lenA = WideCharToMultiByte( CP_ACP, 0, buffer, -1, NULL, 0, NULL, NULL );
if (needed) *needed = lenA;
if (lenA > len)
{
+ /* If the buffer length supplied by the caller is insufficient, Windows returns a
+ 'needed' length based upon the Unicode byte length, so we should do similarly. */
+ if (needed) *needed = lenW;
+
SetLastError( ERROR_INSUFFICIENT_BUFFER );
return FALSE;
}
--
Debian Wine packaging
More information about the pkg-wine-party
mailing list