SMBServer: SMB1: Fixed unhandled NullReferenceException when an Invalid FID was specified for a Read / ReadAndX request

This commit is contained in:
Tal Aloni 2017-08-31 13:50:47 +03:00
parent 0212d71f6a
commit 4ade8c4aa9

View file

@ -25,7 +25,7 @@ namespace SMBLibrary.Server.SMB1
{
state.LogToServer(Severity.Verbose, "Read failed. Invalid FID.");
header.Status = NTStatus.STATUS_INVALID_HANDLE;
return null;
return new ErrorResponse(request.CommandName);
}
if (share is FileSystemShare)
@ -60,7 +60,7 @@ namespace SMBLibrary.Server.SMB1
{
state.LogToServer(Severity.Verbose, "Read failed. Invalid FID.");
header.Status = NTStatus.STATUS_INVALID_HANDLE;
return null;
return new ErrorResponse(request.CommandName);
}
if (share is FileSystemShare)