Commit 29700766 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

shell32: Avoid potential 1 byte overflow.

parent af62bcbd
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment