[PATCH] msscript.ocx: Avoid buffer overflow when getting the type info.
Gabriel Ivăncescu
gabrielopcode at gmail.com
Mon Sep 23 07:53:18 CDT 2019
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/msscript.ocx/msscript.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/msscript.ocx/msscript.c b/dlls/msscript.ocx/msscript.c
index 6e4c8d1..8fdcf20 100644
--- a/dlls/msscript.ocx/msscript.c
+++ b/dlls/msscript.ocx/msscript.c
@@ -139,6 +139,8 @@ static HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
{
HRESULT hres;
+ if (tid >= ARRAY_SIZE(typeinfos))
+ return DISP_E_BADINDEX;
if (!typelib)
hres = load_typelib();
if (!typelib)
--
2.21.0
More information about the wine-devel
mailing list