From d23cf08262d81b047bdc40369cc5add2d21d946d Mon Sep 17 00:00:00 2001
From: Lawson Whitney <lawson_whitney@juno.com>
Date: Fri, 8 Feb 2002 17:09:11 +0000
Subject: [PATCH] Fix off-by-one error in placing trailing \0.

---
 dlls/ole32/storage32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index c7b64c75335..99bdb3446ed 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -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.
-- 
GitLab