Author: cwittich
Date: Sun Jun 28 03:55:29 2009
New Revision: 41654
URL:
http://svn.reactos.org/svn/reactos?rev=41654&view=rev
Log:
fix advapi32 crypt winetests
patch sent to wine
Modified:
trunk/reactos/dll/win32/advapi32/crypt/crypt.c
Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/crypt/c…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/crypt/crypt.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/crypt/crypt.c [iso-8859-1] Sun Jun 28 03:55:29 2009
@@ -1192,6 +1192,9 @@
TRACE("(%ld, %p, %08ld, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszProvName, pcbProvName);
+ if (*pcbProvName > INT_MAX)
+ *pcbProvName = INT_MAX;
+
if(!CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL,
&bufsize))
return FALSE;
if ( pszProvName && !(str = CRYPT_Alloc(bufsize)) )
@@ -1314,6 +1317,9 @@
TRACE("(%ld, %p, %08ld, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszTypeName, pcbTypeName);
+ if (*pcbTypeName > INT_MAX)
+ *pcbTypeName = INT_MAX;
+
if(!CryptEnumProviderTypesW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL,
&bufsize))
return FALSE;
if ( pszTypeName && !(str = CRYPT_Alloc(bufsize)) )
@@ -1512,6 +1518,9 @@
BOOL ret = FALSE;
TRACE("(%d, %p, %08x, %p, %p)\n", dwProvType, pdwReserved, dwFlags,
pszProvName, pcbProvName);
+
+ if (*pcbProvName > INT_MAX)
+ *pcbProvName = INT_MAX;
CryptGetDefaultProviderW(dwProvType, pdwReserved, dwFlags, NULL, &bufsize);
if ( pszProvName && !(str = CRYPT_Alloc(bufsize)) )