Fix buffer length calculation in InitializeGenericSF().

This commit is contained in:
Rein Klazes 2002-07-10 03:00:46 +00:00 committed by Alexandre Julliard
parent 073d09a17f
commit 8ec3ce8845
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}