mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 14:08:22 +00:00
Patch by Amine Khaldi: Fix buffer length check
svn path=/trunk/; revision=44824
This commit is contained in:
parent
a586dab9f9
commit
4080cc2e20
1 changed files with 3 additions and 3 deletions
|
@ -180,14 +180,14 @@ BOOL
|
|||
PrintFileDacl(IN LPTSTR FilePath,
|
||||
IN LPTSTR FileName)
|
||||
{
|
||||
SIZE_T Indent;
|
||||
SIZE_T Length;
|
||||
PSECURITY_DESCRIPTOR SecurityDescriptor;
|
||||
DWORD SDSize = 0;
|
||||
TCHAR FullFileName[MAX_PATH + 1];
|
||||
BOOL Error = FALSE, Ret = FALSE;
|
||||
|
||||
Indent = _tcslen(FilePath) + _tcslen(FileName);
|
||||
if (Indent++ > MAX_PATH - 1)
|
||||
Length = _tcslen(FilePath) + _tcslen(FileName);
|
||||
if (Length > MAX_PATH)
|
||||
{
|
||||
/* file name too long */
|
||||
SetLastError(ERROR_FILE_NOT_FOUND);
|
||||
|
|
Loading…
Reference in a new issue