Use the new ProbeForWriteIoStatusBlock macro

svn path=/trunk/; revision=23828
This commit is contained in:
Thomas Bluemel 2006-08-30 21:45:17 +00:00
parent 176e324621
commit 1fcf9ceba0
3 changed files with 15 additions and 45 deletions

View file

@ -1271,9 +1271,7 @@ IoCreateFile(OUT PHANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
ProbeForWriteHandle(FileHandle); ProbeForWriteHandle(FileHandle);
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
if (AllocationSize) if (AllocationSize)
{ {
SafeAllocationSize = ProbeForReadLargeInteger(AllocationSize); SafeAllocationSize = ProbeForReadLargeInteger(AllocationSize);
@ -2150,9 +2148,7 @@ NtCancelIoFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the I/O Status Block */ /* Probe the I/O Status Block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
} }
_SEH_HANDLE _SEH_HANDLE
{ {

View file

@ -429,9 +429,7 @@ NtRemoveIoCompletion(IN HANDLE IoCompletionHandle,
ProbeForWritePointer(ApcContext); ProbeForWritePointer(ApcContext);
/* Probe the I/O Status Block */ /* Probe the I/O Status Block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
if (Timeout) if (Timeout)
{ {
/* Probe and capture the timeout */ /* Probe and capture the timeout */

View file

@ -218,9 +218,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the status block */ /* Probe the status block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Check if this is buffered I/O */ /* Check if this is buffered I/O */
if (AccessType == METHOD_BUFFERED) if (AccessType == METHOD_BUFFERED)
@ -826,9 +824,7 @@ NtFlushBuffersFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the I/O Status block */ /* Probe the I/O Status block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
} }
_SEH_HANDLE _SEH_HANDLE
{ {
@ -960,9 +956,7 @@ NtNotifyChangeDirectoryFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the I/O STatus block */ /* Probe the I/O STatus block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Probe the buffer */ /* Probe the buffer */
if (BufferSize) ProbeForWrite(Buffer, BufferSize, sizeof(ULONG)); if (BufferSize) ProbeForWrite(Buffer, BufferSize, sizeof(ULONG));
@ -1104,9 +1098,7 @@ NtLockFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the I/O STatus block */ /* Probe the I/O STatus block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Probe and capture the large integers */ /* Probe and capture the large integers */
CapturedByteOffset = ProbeForReadLargeInteger(ByteOffset); CapturedByteOffset = ProbeForReadLargeInteger(ByteOffset);
@ -1263,9 +1255,7 @@ NtQueryDirectoryFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the I/O Status Block */ /* Probe the I/O Status Block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Probe the file information */ /* Probe the file information */
ProbeForWrite(FileInformation, Length, sizeof(ULONG)); ProbeForWrite(FileInformation, Length, sizeof(ULONG));
@ -1502,9 +1492,7 @@ NtQueryInformationFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the I/O Status block */ /* Probe the I/O Status block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Probe the information */ /* Probe the information */
if (Length) ProbeForWrite(FileInformation, Length, 1); if (Length) ProbeForWrite(FileInformation, Length, 1);
@ -1783,9 +1771,7 @@ NtReadFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the status block */ /* Probe the status block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Probe the read buffer */ /* Probe the read buffer */
ProbeForWrite(Buffer, Length, 1); ProbeForWrite(Buffer, Length, 1);
@ -2046,9 +2032,7 @@ NtSetInformationFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the I/O Status block */ /* Probe the I/O Status block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Probe the information */ /* Probe the information */
if (Length) ProbeForRead(FileInformation, Length, 1); if (Length) ProbeForRead(FileInformation, Length, 1);
@ -2407,9 +2391,7 @@ NtUnlockFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the I/O Status block */ /* Probe the I/O Status block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Probe and capture the large integers */ /* Probe and capture the large integers */
CapturedByteOffset = ProbeForReadLargeInteger(ByteOffset); CapturedByteOffset = ProbeForReadLargeInteger(ByteOffset);
@ -2597,9 +2579,7 @@ NtWriteFile(IN HANDLE FileHandle,
} }
/* Probe the status block */ /* Probe the status block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Probe the read buffer */ /* Probe the read buffer */
ProbeForRead(Buffer, Length, 1); ProbeForRead(Buffer, Length, 1);
@ -2839,9 +2819,7 @@ NtQueryVolumeInformationFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the I/O Status block */ /* Probe the I/O Status block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Probe the information */ /* Probe the information */
if (Length) ProbeForWrite(FsInformation, Length, 1); if (Length) ProbeForWrite(FsInformation, Length, 1);
@ -2989,9 +2967,7 @@ NtSetVolumeInformationFile(IN HANDLE FileHandle,
_SEH_TRY _SEH_TRY
{ {
/* Probe the I/O Status block */ /* Probe the I/O Status block */
ProbeForWrite(IoStatusBlock, ProbeForWriteIoStatusBlock(IoStatusBlock);
sizeof(IO_STATUS_BLOCK),
sizeof(ULONG));
/* Probe the information */ /* Probe the information */
if (Length) ProbeForRead(FsInformation, Length, 1); if (Length) ProbeForRead(FsInformation, Length, 1);