mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
Windows: AFSParseMountPointTarget buffer overrun
When parsing the AFS mount point string do not overrun the buffer if the colon cell/volume separator is not found. Change-Id: Id7275cc8815223730f7c39bd11a6f495beb117c4 Reviewed-on: http://gerrit.openafs.org/6507 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Peter Scott <pscott@kerneldrivers.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com> Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
parent
ba4f5afc9c
commit
6185532db5
@ -115,7 +115,8 @@ AFSParseMountPointTarget( IN UNICODE_STRING *Target,
|
|||||||
|
|
||||||
// If a colon is not found, it means there is no cell
|
// If a colon is not found, it means there is no cell
|
||||||
|
|
||||||
if ( Cell->Buffer[ Cell->Length / sizeof( WCHAR)] == L':')
|
if ( Cell->Length < Target->Length - sizeof( WCHAR) &&
|
||||||
|
Cell->Buffer[ Cell->Length / sizeof( WCHAR)] == L':')
|
||||||
{
|
{
|
||||||
|
|
||||||
Cell->MaximumLength = Cell->Length;
|
Cell->MaximumLength = Cell->Length;
|
||||||
|
Loading…
Reference in New Issue
Block a user