Added patch for arguments check in LoadTypeLibEx.

This commit is contained in:
Sebastian Lackner 2016-11-15 17:02:55 +01:00
parent fb62a188f4
commit ce0c9566c9
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,26 @@
From 7f6dd6cba12884b026a3aafce30173341d2f610b Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Mon, 7 Nov 2016 19:50:54 +0800
Subject: oleaut32: Add an arguments check to LoadTypeLibEx.
---
dlls/oleaut32/typelib.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index e9f1507..b0ae6b6 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -482,6 +482,9 @@ HRESULT WINAPI LoadTypeLibEx(
TRACE("(%s,%d,%p)\n",debugstr_w(szFile), regkind, pptLib);
+ if (!szFile || !pptLib)
+ return E_INVALIDARG;
+
*pptLib = NULL;
res = TLB_ReadTypeLib(szFile, szPath, MAX_PATH + 1, (ITypeLib2**)pptLib);
--
2.9.0

View File

@ -0,0 +1 @@
Fixes: [38328] Add arguments check to LoadTypeLibEx

View File

@ -255,6 +255,7 @@ patch_enable_all ()
enable_ole32_HGLOBALStream="$1"
enable_ole32_OleGetIconOfFile="$1"
enable_oleaut32_CreateTypeLib="$1"
enable_oleaut32_LoadTypeLibEx="$1"
enable_oleaut32_Load_Save_EMF="$1"
enable_oleaut32_OLEPictureImpl_SaveAsFile="$1"
enable_oleaut32_OleLoadPicture="$1"
@ -946,6 +947,9 @@ patch_enable ()
oleaut32-CreateTypeLib)
enable_oleaut32_CreateTypeLib="$2"
;;
oleaut32-LoadTypeLibEx)
enable_oleaut32_LoadTypeLibEx="$2"
;;
oleaut32-Load_Save_EMF)
enable_oleaut32_Load_Save_EMF="$2"
;;
@ -5658,6 +5662,21 @@ if test "$enable_oleaut32_CreateTypeLib" -eq 1; then
) >> "$patchlist"
fi
# Patchset oleaut32-LoadTypeLibEx
# |
# | This patchset fixes the following Wine bugs:
# | * [#38328] Add arguments check to LoadTypeLibEx
# |
# | Modified files:
# | * dlls/oleaut32/typelib.c
# |
if test "$enable_oleaut32_LoadTypeLibEx" -eq 1; then
patch_apply oleaut32-LoadTypeLibEx/0001-oleaut32-Add-an-arguments-check-to-LoadTypeLibEx.patch
(
echo '+ { "Dmitry Timoshkov", "oleaut32: Add an arguments check to LoadTypeLibEx.", 1 },';
) >> "$patchlist"
fi
# Patchset oleaut32-Load_Save_EMF
# |
# | This patchset fixes the following Wine bugs: