mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[ROSTESTS]
Correct spelling and Co. svn path=/trunk/; revision=58678
This commit is contained in:
parent
c45852fcfd
commit
fed0b44fc6
|
@ -194,9 +194,9 @@ NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING Registry
|
||||||
CsqAcquireLock, CsqReleaseLock, CsqCompleteCancelledIrp);
|
CsqAcquireLock, CsqReleaseLock, CsqCompleteCancelledIrp);
|
||||||
|
|
||||||
if(Status != STATUS_SUCCESS)
|
if(Status != STATUS_SUCCESS)
|
||||||
KdPrint(("csqtest: IoCsqInitalize failed: 0x%x\n", Status));
|
KdPrint(("csqtest: IoCsqInitialize failed: 0x%x\n", Status));
|
||||||
else
|
else
|
||||||
KdPrint(("csqtest: IoCsqInitalize succeeded\n"));
|
KdPrint(("csqtest: IoCsqInitialize succeeded\n"));
|
||||||
|
|
||||||
InitializeListHead(&IrpQueue);
|
InitializeListHead(&IrpQueue);
|
||||||
KeInitializeSpinLock(&IrpQueueLock);
|
KeInitializeSpinLock(&IrpQueueLock);
|
||||||
|
|
|
@ -34,16 +34,16 @@ IoCheckEaBufferValidityROS(IN PFILE_FULL_EA_INFORMATION EaBuffer,
|
||||||
ULONG NextEaBufferOffset;
|
ULONG NextEaBufferOffset;
|
||||||
UINT IntEaLength;
|
UINT IntEaLength;
|
||||||
|
|
||||||
/* Length of the rest. Inital equal to EaLength */
|
/* Length of the rest. Initialize it to EaLength */
|
||||||
IntEaLength = EaLength;
|
IntEaLength = EaLength;
|
||||||
/* Inital EaBuffer equal to EaBuffer */
|
/* Initialize EaBuffer to EaBuffer */
|
||||||
EaBufferEnd = EaBuffer;
|
EaBufferEnd = EaBuffer;
|
||||||
|
|
||||||
/* The rest length of the buffer */
|
/* The rest length of the buffer */
|
||||||
/* 8 = sizeof(ULONG) + sizeof(UCHAR) + sizeof(UCHAR) + sizeof(USHORT) */
|
/* 8 = sizeof(ULONG) + sizeof(UCHAR) + sizeof(UCHAR) + sizeof(USHORT) */
|
||||||
while (IntEaLength >= 8)
|
while (IntEaLength >= 8)
|
||||||
{
|
{
|
||||||
/* rest of buffer must greater then the sizeof(FILE_FULL_EA_INFORMATION) + buffer */
|
/* The rest of the buffer must be greater than sizeof(FILE_FULL_EA_INFORMATION) + buffer */
|
||||||
NextEaBufferOffset = EaBufferEnd->EaNameLength+EaBufferEnd->EaValueLength + 9;
|
NextEaBufferOffset = EaBufferEnd->EaNameLength+EaBufferEnd->EaValueLength + 9;
|
||||||
if (IntEaLength >= NextEaBufferOffset)
|
if (IntEaLength >= NextEaBufferOffset)
|
||||||
{
|
{
|
||||||
|
@ -63,14 +63,14 @@ IoCheckEaBufferValidityROS(IN PFILE_FULL_EA_INFORMATION EaBuffer,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
From the MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx).
|
From MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx).
|
||||||
For all entries except the last, the value of NextEntryOffset must be greater
|
For all entries except the last, the value of NextEntryOffset must be greater
|
||||||
than zero and must fall on a ULONG boundary.
|
than zero and must fall on a ULONG boundary.
|
||||||
*/
|
*/
|
||||||
NextEaBufferOffset = ((NextEaBufferOffset + 3) & 0xFFFFFFFC);
|
NextEaBufferOffset = ((NextEaBufferOffset + 3) & 0xFFFFFFFC);
|
||||||
if ((EaBufferEnd->NextEntryOffset == NextEaBufferOffset) && (EaBufferEnd->NextEntryOffset>0))
|
if ((EaBufferEnd->NextEntryOffset == NextEaBufferOffset) && (EaBufferEnd->NextEntryOffset>0))
|
||||||
{
|
{
|
||||||
/* rest of buffer must be greater then the next offset */
|
/* The rest of the buffer must be greater than the next offset */
|
||||||
IntEaLength = IntEaLength - EaBufferEnd->NextEntryOffset;
|
IntEaLength = IntEaLength - EaBufferEnd->NextEntryOffset;
|
||||||
if (IntEaLength>=0)
|
if (IntEaLength>=0)
|
||||||
{
|
{
|
||||||
|
@ -86,7 +86,7 @@ IoCheckEaBufferValidityROS(IN PFILE_FULL_EA_INFORMATION EaBuffer,
|
||||||
|
|
||||||
if (ErrorOffset != NULL)
|
if (ErrorOffset != NULL)
|
||||||
{
|
{
|
||||||
/* calculate the error offset. Or in */
|
/* calculate the error offset. */
|
||||||
*ErrorOffset = (ULONG)((ULONG_PTR)EaBufferEnd - (ULONG_PTR)EaBuffer);
|
*ErrorOffset = (ULONG)((ULONG_PTR)EaBufferEnd - (ULONG_PTR)EaBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue