shell32: Avoid potential 1 byte overflow.

This commit is contained in:
Marcus Meissner 2007-05-11 20:09:29 +01:00 committed by Alexandre Julliard
parent af62bcbd32
commit 29700766ea

View file

@ -654,6 +654,8 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation,
&filetypelen) == ERROR_SUCCESS)
{
filetypelen /= sizeof(WCHAR);
if (filetypelen == sizeof(filetype)/sizeof(WCHAR))
filetypelen--;
filetype[filetypelen] = '\0';
TRACE("File type: %s\n", debugstr_w(filetype));
}