From 8ec3ce88453d7858916252d9e4eba05c25046a48 Mon Sep 17 00:00:00 2001 From: Rein Klazes Date: Wed, 10 Jul 2002 03:00:46 +0000 Subject: [PATCH] Fix buffer length calculation in InitializeGenericSF(). --- dlls/shell32/shlfolder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index afdc544709d..2ff801a2df0 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -503,7 +503,7 @@ static HRESULT InitializeGenericSF(IGenericSFImpl * sf, LPITEMIDLIST pidlRoot, L sPos = sNewPath; } _ILSimpleGetText(pidlFolder, sPos, MAX_PATH - (sPos - sNewPath)); - if(!((sf->sPathRoot = SHAlloc(strlen(sNewPath+1))))) return E_OUTOFMEMORY; + if(!((sf->sPathRoot = SHAlloc(strlen(sNewPath)+1)))) return E_OUTOFMEMORY; strcpy(sf->sPathRoot, sNewPath); TRACE("-- %s\n", sNewPath); } -- 2.11.4.GIT