Author: fireball
Date: Fri Jan 25 17:08:11 2008
New Revision: 31990
URL:
http://svn.reactos.org/svn/reactos?rev=31990&view=rev
Log:
- Fix out-of-bounds access, spotted by Christoph & GCC 4.3.0.
Modified:
trunk/reactos/ntoskrnl/config/i386/cmhardwr.c
trunk/reactos/ntoskrnl/include/internal/cm.h
Modified: trunk/reactos/ntoskrnl/config/i386/cmhardwr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/i386/cmhar…
==============================================================================
--- trunk/reactos/ntoskrnl/config/i386/cmhardwr.c (original)
+++ trunk/reactos/ntoskrnl/config/i386/cmhardwr.c Fri Jan 25 17:08:11 2008
@@ -446,7 +446,7 @@
}
/* Null-terminate it */
- CpuString[48] = ANSI_NULL;
+ CpuString[47] = ANSI_NULL;
}
}
Modified: trunk/reactos/ntoskrnl/include/internal/cm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/cm.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/cm.h Fri Jan 25 17:08:11 2008
@@ -368,7 +368,7 @@
typedef struct _CMHIVE
{
HHIVE Hive;
- HANDLE FileHandles[3];
+ HANDLE FileHandles[HFILE_TYPE_MAX];
LIST_ENTRY NotifyList;
LIST_ENTRY HiveList;
EX_PUSH_LOCK HiveLock;