Nikolay Sivov : shell32: Limit displayed volume label length to 32.
Module: wine Branch: master Commit: 960b5996fc61833f7927dcf214e1f95d5539c8e4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=960b5996fc61833f7927dcf214... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 28 12:56:52 2016 +0300 shell32: Limit displayed volume label length to 32. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/shfldr_mycomp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c index 4022c8d..d47d2af 100644 --- a/dlls/shell32/shfldr_mycomp.c +++ b/dlls/shell32/shfldr_mycomp.c @@ -695,15 +695,12 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface, /* long view "lw_name (C:)" */ if (!(dwFlags & SHGDN_FORPARSING)) { - DWORD dwVolumeSerialNumber, dwMaximumComponetLength, dwFileSystemFlags; - WCHAR wszDrive[18] = {0}; static const WCHAR wszOpenBracket[] = {' ','(',0}; static const WCHAR wszCloseBracket[] = {')',0}; + WCHAR wszDrive[32 /* label */ + 6 /* ' (C:)'\0 */] = {0}; - GetVolumeInformationW (pszPath, wszDrive, - sizeof(wszDrive)/sizeof(wszDrive[0]) - 6, - &dwVolumeSerialNumber, - &dwMaximumComponetLength, &dwFileSystemFlags, NULL, 0); + GetVolumeInformationW (pszPath, wszDrive, sizeof(wszDrive)/sizeof(wszDrive[0]) - 5, + NULL, NULL, NULL, NULL, 0); strcatW (wszDrive, wszOpenBracket); lstrcpynW (wszDrive + strlenW(wszDrive), pszPath, 3); strcatW (wszDrive, wszCloseBracket);
participants (1)
-
Alexandre Julliard