mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
Windows: fail if pSrcParentObject cannot be resolved
In AFSSetFileLinkInfo and AFSSetRenameInfo return STATUS_INVALID_PARAMETER if pSrcParentObject cannot be determined. Otherwise, a NULL pointer dereference will occur. Change-Id: I0e265433aa85066005e90b3584f8e865c5be79c8 Reviewed-on: http://gerrit.openafs.org/9807 Reviewed-by: Peter Scott <pscott@kerneldrivers.com> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
0653c81c2a
commit
4512b47be8
@ -2300,6 +2300,18 @@ AFSSetFileLinkInfo( IN PIRP Irp)
|
||||
&pSrcFcb->ObjectInformation->ParentFileId);
|
||||
}
|
||||
|
||||
if( pSrcParentObject == NULL)
|
||||
{
|
||||
|
||||
AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
|
||||
AFS_TRACE_LEVEL_ERROR,
|
||||
"AFSSetFileLinkInfo Unable to resolve SrcParentObject (INVALID_PARAMETER)\n"));
|
||||
|
||||
ASSERT( FALSE);
|
||||
|
||||
try_return( ntStatus = STATUS_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
pFileLinkInfo = (PFILE_LINK_INFORMATION)Irp->AssociatedIrp.SystemBuffer;
|
||||
|
||||
//
|
||||
@ -2723,6 +2735,18 @@ AFSSetRenameInfo( IN PIRP Irp)
|
||||
&pSrcFcb->ObjectInformation->ParentFileId);
|
||||
}
|
||||
|
||||
if( pSrcParentObject == NULL)
|
||||
{
|
||||
|
||||
AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
|
||||
AFS_TRACE_LEVEL_ERROR,
|
||||
"AFSSetRenameInfo Unable to resolve SrcParentObject (INVALID_PARAMETER)\n"));
|
||||
|
||||
ASSERT( FALSE);
|
||||
|
||||
try_return( ntStatus = STATUS_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
//
|
||||
// Perform some basic checks to ensure FS integrity
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user