wine-staging/patches/msvideo16-HasThunk/0001-msvideo16-Check-if-any-16-bit-thunks-have-been-alloc.patch

28 lines
849 B
Diff
Raw Normal View History

From d386a3724eac666427f7f176e7209f74e1b98885 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 15 Jan 2017 18:59:10 +0100
Subject: msvideo16: Check if any 16 bit thunks have been allocated before
accessing pointer.
---
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 8f02cc1ebc8..5a3b8aa74ee 100644
--- a/dlls/msvideo.dll16/msvideo16.c
+++ b/dlls/msvideo.dll16/msvideo16.c
@@ -762,6 +762,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;
--
2.11.0