Skip to content
Snippets Groups Projects
Commit d23cf082 authored by Lawson Whitney's avatar Lawson Whitney Committed by Alexandre Julliard
Browse files

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

parent 023b1aae
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment