crypt32: Added some input validation.

This commit is contained in:
Paul Vriens 2006-09-08 13:18:46 +02:00 committed by Alexandre Julliard
parent bb49763154
commit 8840ef3327
1 changed files with 10 additions and 1 deletions

View File

@ -181,8 +181,17 @@ BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv)
TRACE("%p\n", psNewProv);
if( !psNewProv )
if (!psNewProv ||
psNewProv->cbStruct != sizeof(SIP_ADD_NEWPROVIDER) ||
!psNewProv->pwszGetFuncName ||
!psNewProv->pwszPutFuncName ||
!psNewProv->pwszCreateFuncName ||
!psNewProv->pwszVerifyFuncName ||
!psNewProv->pwszRemoveFuncName)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
TRACE("%s %s %s %s\n",
debugstr_guid( psNewProv->pgSubject ),