msvideo.dll16: Check if any 16 bit thunks have been allocated before accessing pointer.
Sebastian Lackner
sebastian at fds-team.de
Fri Feb 3 02:36:45 CST 2017
From: Michael Müller <michael at fds-team.de>
Signed-off-by: Michael Müller <michael at fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---
For https://bugs.winehq.org/show_bug.cgi?id=41448.
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;
--
2.11.0
More information about the wine-patches
mailing list