Author: ion
Date: Sun Dec 4 16:27:32 2011
New Revision: 54586
URL: http://svn.reactos.org/svn/reactos?rev=54586&view=rev
Log:
[RTL]: Fix a bug in RtlGetCurrentDirectory_U.
Modified:
trunk/reactos/lib/rtl/path.c
Modified: trunk/reactos/lib/rtl/path.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/path.c?rev=54586&r…
==============================================================================
--- trunk/reactos/lib/rtl/path.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/path.c [iso-8859-1] Sun Dec 4 16:27:32 2011
@@ -899,13 +899,13 @@
{
/* Call has no space for it, fail, add the trailing slash */
RtlReleasePebLock();
- return Bytes + sizeof(L'\\');
+ return Bytes + sizeof(OBJ_NAME_PATH_SEPARATOR);
}
}
else
{
/* Check if caller does not have enough space */
- if (MaximumLength <= Bytes)
+ if (MaximumLength < Bytes)
{
/* Call has no space for it, fail */
RtlReleasePebLock();
@@ -917,7 +917,7 @@
RtlCopyMemory(Buffer, CurDirName, Bytes);
/* The buffer should end with a path separator */
- ASSERT(Buffer[Length - 1] == L'\\');
+ ASSERT(Buffer[Length - 1] == OBJ_NAME_PATH_SEPARATOR);
/* Again check for our two cases (drive root vs path) */
if ((Length <= 1) || (Buffer[Length - 2] != L':'))
Author: cgutman
Date: Sat Dec 3 22:46:15 2011
New Revision: 54577
URL: http://svn.reactos.org/svn/reactos?rev=54577&view=rev
Log:
[NTOSKRNL]
- Gracefully fail when there is no more pool space left
- Mm already prints plenty of warnings in this case
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/expool.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/expool.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] Sat Dec 3 22:46:15 2011
@@ -686,7 +686,9 @@
// There were no free entries left, so we have to allocate a new fresh page
//
Entry = MiAllocatePoolPages(PoolType, PAGE_SIZE);
- ASSERT(Entry != NULL);
+ if (Entry == NULL)
+ return NULL;
+
Entry->Ulong1 = 0;
Entry->BlockSize = i;
Entry->PoolType = PoolType + 1;