Author: cwittich
Date: Mon Mar 2 17:23:38 2015
New Revision: 66543
URL:
http://svn.reactos.org/svn/reactos?rev=66543&view=rev
Log:
[WLANAPI]
add checks for invalid parameters
Modified:
trunk/reactos/dll/win32/wlanapi/main.c
trunk/reactos/dll/win32/wlanapi/profile.c
Modified: trunk/reactos/dll/win32/wlanapi/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wlanapi/main.c?r…
==============================================================================
--- trunk/reactos/dll/win32/wlanapi/main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wlanapi/main.c [iso-8859-1] Mon Mar 2 17:23:38 2015
@@ -108,7 +108,7 @@
{
DWORD dwError = ERROR_SUCCESS;
- if ((pReserved != NULL) || (hClientHandle == NULL))
+ if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) ||
(pConnectionParameters == NULL))
return ERROR_INVALID_PARAMETER;
RpcTryExcept
@@ -132,7 +132,7 @@
{
DWORD dwError = ERROR_SUCCESS;
- if ((pReserved != NULL) || (hClientHandle == NULL))
+ if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL))
return ERROR_INVALID_PARAMETER;
RpcTryExcept
Modified: trunk/reactos/dll/win32/wlanapi/profile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wlanapi/profile.…
==============================================================================
--- trunk/reactos/dll/win32/wlanapi/profile.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wlanapi/profile.c [iso-8859-1] Mon Mar 2 17:23:38 2015
@@ -39,6 +39,9 @@
IN LPCWSTR strProfileName,
PVOID pReserved)
{
+ if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) ||
(strProfileName == NULL))
+ return ERROR_INVALID_PARAMETER;
+
UNIMPLEMENTED;
return ERROR_SUCCESS;
}
@@ -51,6 +54,9 @@
IN LPCWSTR strNewProfileName,
PVOID pReserved)
{
+ if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) ||
(strOldProfileName == NULL) || (strNewProfileName == NULL))
+ return ERROR_INVALID_PARAMETER;
+
UNIMPLEMENTED;
return ERROR_SUCCESS;
}
@@ -65,6 +71,9 @@
DWORD *pdwFlags,
PDWORD pdwGrantedAccess)
{
+ if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) ||
(pstrProfileXml == NULL))
+ return ERROR_INVALID_PARAMETER;
+
UNIMPLEMENTED;
return ERROR_SUCCESS;
}
@@ -80,6 +89,9 @@
PVOID pReserved,
OUT DWORD *pdwReasonCode)
{
+ if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) ||
(strProfileXml == NULL) || (pdwReasonCode == NULL))
+ return ERROR_INVALID_PARAMETER;
+
UNIMPLEMENTED;
return ERROR_SUCCESS;
}
@@ -93,6 +105,9 @@
OUT DWORD *pdwDataSize,
OUT PBYTE *ppData)
{
+ if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) ||
(strProfileName == NULL))
+ return ERROR_INVALID_PARAMETER;
+
UNIMPLEMENTED;
return ERROR_SUCCESS;
}
@@ -106,6 +121,12 @@
IN const PBYTE pData,
PVOID pReserved)
{
+ if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) ||
(strProfileName == NULL))
+ return ERROR_INVALID_PARAMETER;
+
+ if ((dwDataSize != 0) && (pData == NULL))
+ return ERROR_INVALID_PARAMETER;
+
UNIMPLEMENTED;
return ERROR_SUCCESS;
}
@@ -117,6 +138,9 @@
PVOID pReserved,
OUT PWLAN_PROFILE_INFO_LIST *ppProfileList)
{
+ if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) ||
(ppProfileList == NULL))
+ return ERROR_INVALID_PARAMETER;
+
UNIMPLEMENTED;
return ERROR_SUCCESS;
}
@@ -129,6 +153,9 @@
IN LPCWSTR *strProfileNames,
PVOID pReserved)
{
+ if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) ||
(strProfileNames == NULL) || (dwItems == 0))
+ return ERROR_INVALID_PARAMETER;
+
UNIMPLEMENTED;
return ERROR_SUCCESS;
}