From ea7cc6fc553ba25fe8acfc6d5a694c54cdbf9c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 3 Feb 2017 09:36:45 +0100 Subject: [PATCH] msvideo.dll16: Check if any 16 bit thunks have been allocated before accessing pointer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Müller Signed-off-by: Sebastian Lackner Signed-off-by: Alexandre Julliard --- dlls/msvideo.dll16/msvideo16.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/msvideo.dll16/msvideo16.c b/dlls/msvideo.dll16/msvideo16.c index 28f126c957e..d390020eccd 100644 --- a/dlls/msvideo.dll16/msvideo16.c +++ b/dlls/msvideo.dll16/msvideo16.c @@ -771,6 +771,9 @@ static struct msvideo_thunk* MSVIDEO_HasThunk(HIC16 hic) { struct msvideo_thunk* thunk; + if (!MSVIDEO_Thunks) + return NULL; + for (thunk = MSVIDEO_Thunks; thunk < &MSVIDEO_Thunks[MAX_THUNKS]; thunk++) { if (thunk->hIC16 == hic) return thunk;