From 23ff2d51a72e46c7e3434e96ab2187a3812bc8e2 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 28 Jan 2004 21:40:01 +0000 Subject: [PATCH] Make sure that there is extra information in the exception record before accessing it in check_resource_write. --- dlls/kernel/except.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/kernel/except.c b/dlls/kernel/except.c index 10042e2ea52..5641ee20a04 100644 --- a/dlls/kernel/except.c +++ b/dlls/kernel/except.c @@ -415,6 +415,7 @@ inline static BOOL check_resource_write( const EXCEPTION_RECORD *rec ) MEMORY_BASIC_INFORMATION info; if (rec->ExceptionCode != EXCEPTION_ACCESS_VIOLATION) return FALSE; + if (rec->NumberParameters < 2) return FALSE; if (!rec->ExceptionInformation[0]) return FALSE; /* not a write access */ addr = (void *)rec->ExceptionInformation[1]; if (!VirtualQuery( addr, &info, sizeof(info) )) return FALSE;