[2/7] wmiutils: Validate parameters in IWbemPath::SetText and IWbemPath::GetText.

Hans Leidekker hans at codeweavers.com
Wed Jan 2 06:06:55 CST 2013


---
 dlls/wmiutils/path.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/wmiutils/path.c b/dlls/wmiutils/path.c
index a4f3870..e32c9b6 100644
--- a/dlls/wmiutils/path.c
+++ b/dlls/wmiutils/path.c
@@ -100,6 +100,8 @@ static HRESULT WINAPI path_SetText(
 
     TRACE("%p, %u, %s\n", iface, uMode, debugstr_w(pszPath));
 
+    if (!pszPath) return WBEM_E_INVALID_PARAMETER;
+
     if (uMode) FIXME("igoring mode %u\n", uMode);
 
     len = strlenW( pszPath );
@@ -120,6 +122,8 @@ static HRESULT WINAPI path_GetText(
 
     TRACE("%p, 0x%x, %p, %p\n", iface, lFlags, puBufferLength, pszText);
 
+    if (!puBufferLength || !pszText) return WBEM_E_INVALID_PARAMETER;
+
     if (lFlags != WBEMPATH_GET_ORIGINAL)
     {
         FIXME("flags 0x%x not supported\n", lFlags);
-- 
1.7.10.4







More information about the wine-patches mailing list