From 36a547b4a7a63bfebe931323da4619e75ebebe96 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 28 Sep 2008 21:25:24 +0000 Subject: [PATCH] Extend ObjTypeInfo array to 32 entries. Fixes Coverity CID 538 svn path=/trunk/; revision=36584 --- reactos/subsystems/win32/win32k/objects/gdiobj.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reactos/subsystems/win32/win32k/objects/gdiobj.c b/reactos/subsystems/win32/win32k/objects/gdiobj.c index 4fdc4060871..5a8eca28765 100644 --- a/reactos/subsystems/win32/win32k/objects/gdiobj.c +++ b/reactos/subsystems/win32/win32k/objects/gdiobj.c @@ -20,6 +20,8 @@ /* apparently the first 10 entries are never used in windows as they are empty */ #define RESERVE_ENTRIES_COUNT 10 +#define BASE_OBJTYPE_COUNT 32 + #define DelayExecution() \ DPRINT("%s:%i: Delay\n", __FILE__, __LINE__); \ KeDelayExecutionThread(KernelMode, FALSE, &ShortDelay) @@ -37,7 +39,7 @@ typedef struct } OBJ_TYPE_INFO, *POBJ_TYPE_INFO; static const -OBJ_TYPE_INFO ObjTypeInfo[] = +OBJ_TYPE_INFO ObjTypeInfo[BASE_OBJTYPE_COUNT] = { {0, 0, 0, NULL}, /* 00 reserved entry */ {1, sizeof(DC), TAG_DC, DC_Cleanup}, /* 01 DC */ @@ -70,10 +72,9 @@ OBJ_TYPE_INFO ObjTypeInfo[] = {0, 0, TAG_DRVOBJ, NULL}, /* 1c DRVOBJ, unused */ {0, 0, TAG_DCIOBJ, NULL}, /* 1d DCIOBJ, unused */ {0, 0, TAG_SPOOL, NULL}, /* 1e SPOOL, unused */ + {0, 0, 0, NULL}, /* 1f reserved entry */ }; -#define BASE_OBJTYPE_COUNT (sizeof(ObjTypeInfo) / sizeof(ObjTypeInfo[0])) - static LARGE_INTEGER ShortDelay; /** DEBUGGING *****************************************************************/