Commit d23cf082 authored by Lawson Whitney's avatar Lawson Whitney Committed by Alexandre Julliard

Fix off-by-one error in placing trailing \0.

parent 023b1aae
......@@ -5615,7 +5615,7 @@ HRESULT WINAPI StgOpenStorage(
/* prepare the file name string given in lieu of the root property name */
GetFullPathNameW(pwcsName, MAX_PATH, fullname, NULL);
memcpy(newStorage->filename, fullname, PROPERTY_NAME_BUFFER_LEN);
newStorage->filename[PROPERTY_NAME_BUFFER_LEN] = '\0';
newStorage->filename[PROPERTY_NAME_BUFFER_LEN-1] = '\0';
/*
* Get an "out" pointer for the caller.
......
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