[PATCH] vbscript: Name get_typeinfo differently to help Coverity

Marcus Meissner marcus at jet.franken.de
Sun Oct 16 04:32:24 CDT 2011


Hi,

Coverity does not really see that the msxml3 and vbscript get_typeinfo
framework is differently and so has some misdetections of overflows.

Rename the vbscript typeinfo to vbs_get_typeinfo to help.

Ciao, Marcus
---
 dlls/vbscript/error.c         |    2 +-
 dlls/vbscript/global.c        |    2 +-
 dlls/vbscript/vbscript.h      |    2 +-
 dlls/vbscript/vbscript_main.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/vbscript/error.c b/dlls/vbscript/error.c
index 9739ba7..b120714 100644
--- a/dlls/vbscript/error.c
+++ b/dlls/vbscript/error.c
@@ -83,7 +83,7 @@ HRESULT init_err(script_ctx_t *ctx)
     ctx->err_desc.builtin_prop_cnt = sizeof(err_props)/sizeof(*err_props);
     ctx->err_desc.builtin_props = err_props;
 
-    hres = get_typeinfo(ErrObj_tid, &ctx->err_desc.typeinfo);
+    hres = vbs_get_typeinfo(ErrObj_tid, &ctx->err_desc.typeinfo);
     if(FAILED(hres))
         return hres;
 
diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c
index dad20b9..36ad1f2 100644
--- a/dlls/vbscript/global.c
+++ b/dlls/vbscript/global.c
@@ -1581,7 +1581,7 @@ HRESULT init_global(script_ctx_t *ctx)
     ctx->global_desc.builtin_prop_cnt = sizeof(global_props)/sizeof(*global_props);
     ctx->global_desc.builtin_props = global_props;
 
-    hres = get_typeinfo(GlobalObj_tid, &ctx->global_desc.typeinfo);
+    hres = vbs_get_typeinfo(GlobalObj_tid, &ctx->global_desc.typeinfo);
     if(FAILED(hres))
         return hres;
 
diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h
index 890c7c7..a0a3e37 100644
--- a/dlls/vbscript/vbscript.h
+++ b/dlls/vbscript/vbscript.h
@@ -322,7 +322,7 @@ TID_LIST
     LAST_tid
 } tid_t;
 
-HRESULT get_typeinfo(tid_t,ITypeInfo**) DECLSPEC_HIDDEN;
+HRESULT vbs_get_typeinfo(tid_t,ITypeInfo**) DECLSPEC_HIDDEN;
 
 HRESULT WINAPI VBScriptFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
 
diff --git a/dlls/vbscript/vbscript_main.c b/dlls/vbscript/vbscript_main.c
index c47227f..9917095 100644
--- a/dlls/vbscript/vbscript_main.c
+++ b/dlls/vbscript/vbscript_main.c
@@ -42,7 +42,7 @@ TID_LIST
 #undef XDIID
 };
 
-HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
+HRESULT vbs_get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
 {
     HRESULT hres;
 
-- 
1.7.3.4




More information about the wine-patches mailing list