[WLANAPI]

add checks for invalid parameters

svn path=/trunk/; revision=66543
This commit is contained in:
Christoph von Wittich 2015-03-02 17:23:38 +00:00
parent 314db647da
commit d95aa9978c
2 changed files with 29 additions and 2 deletions

View file

@ -108,7 +108,7 @@ WlanConnect(IN HANDLE hClientHandle,
{
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 @@ WlanDisconnect(IN HANDLE hClientHandle,
{
DWORD dwError = ERROR_SUCCESS;
if ((pReserved != NULL) || (hClientHandle == NULL))
if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL))
return ERROR_INVALID_PARAMETER;
RpcTryExcept

View file

@ -39,6 +39,9 @@ WlanDeleteProfile(IN HANDLE hClientHandle,
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 @@ WlanRenameProfile(IN HANDLE hClientHandle,
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 @@ WlanGetProfile(IN HANDLE hClientHandle,
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 @@ WlanSetProfile(IN HANDLE hClientHandle,
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 @@ WlanGetProfileCustomUserData(IN HANDLE hClientHandle,
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 @@ WlanSetProfileCustomUserData(IN HANDLE hClientHandle,
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 @@ WlanGetProfileList(IN HANDLE hClientHandle,
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 @@ WlanSetProfileList(IN HANDLE hClientHandle,
IN LPCWSTR *strProfileNames,
PVOID pReserved)
{
if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileNames == NULL) || (dwItems == 0))
return ERROR_INVALID_PARAMETER;
UNIMPLEMENTED;
return ERROR_SUCCESS;
}