mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:55:42 +00:00
[RTL]
- Fix a couple of potential null pointer accesses svn path=/trunk/; revision=52746
This commit is contained in:
parent
04db4cde59
commit
e399b918e2
1 changed files with 5 additions and 1 deletions
|
@ -210,6 +210,9 @@ RtlDetermineDosPathNameType_Ustr(IN PCUNICODE_STRING PathString)
|
|||
Path = PathString->Buffer;
|
||||
Chars = PathString->Length / sizeof(WCHAR);
|
||||
|
||||
/* Return if there are no characters */
|
||||
if (!Chars) return RtlPathTypeUnknown;
|
||||
|
||||
/*
|
||||
* The algorithm is similar to RtlDetermineDosPathNameType_U but here we
|
||||
* actually check for the path length before touching the characters
|
||||
|
@ -291,7 +294,8 @@ RtlGetFullPathName_Ustr(IN PUNICODE_STRING FileName,
|
|||
|
||||
/* Handle initial path type and failure case */
|
||||
*PathType = RtlPathTypeUnknown;
|
||||
if (!(Size) || !(Buffer) || !(FileName) || (FileName->Buffer[0] == UNICODE_NULL)) return 0;
|
||||
if (!(Size) || !(Buffer) || !(FileName) ||
|
||||
!(FileName->Length) || (FileName->Buffer[0] == UNICODE_NULL)) return 0;
|
||||
|
||||
/* Break filename into component parts */
|
||||
FileNameBuffer = FileName->Buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue