[WINTRUST]
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 24 Apr 2014 15:47:48 +0000 (15:47 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 24 Apr 2014 15:47:48 +0000 (15:47 +0000)
* Sync with Wine 1.7.17.
CORE-8080

svn path=/trunk/; revision=62948

reactos/dll/win32/wintrust/crypt.c
reactos/dll/win32/wintrust/register.c
reactos/media/doc/README.WINE

index 8236515..b59bfdd 100644 (file)
@@ -104,7 +104,7 @@ BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN *catAdmin,
 
     TRACE("%p %s %x\n", catAdmin, debugstr_guid(sys), dwFlags);
 
-    if (!catAdmin)
+    if (!catAdmin || dwFlags)
     {
         SetLastError(ERROR_INVALID_PARAMETER);
         return FALSE;
@@ -900,6 +900,7 @@ HANDLE WINAPI CryptCATOpen(LPWSTR pwszFileName, DWORD fdwOpenFlags, HCRYPTPROV h
             if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_PARAM, i, NULL, &size))
             {
                 CryptMsgClose(hmsg);
+                HeapFree(GetProcessHeap(), 0, cc);
                 return INVALID_HANDLE_VALUE;
             }
             sum += size;
@@ -907,6 +908,7 @@ HANDLE WINAPI CryptCATOpen(LPWSTR pwszFileName, DWORD fdwOpenFlags, HCRYPTPROV h
         if (!(cc->attr = HeapAlloc(GetProcessHeap(), 0, sizeof(*cc->attr) * cc->attr_count + sum)))
         {
             CryptMsgClose(hmsg);
+            HeapFree(GetProcessHeap(), 0, cc);
             SetLastError(ERROR_OUTOFMEMORY);
             return INVALID_HANDLE_VALUE;
         }
@@ -917,12 +919,14 @@ HANDLE WINAPI CryptCATOpen(LPWSTR pwszFileName, DWORD fdwOpenFlags, HCRYPTPROV h
             {
                 CryptMsgClose(hmsg);
                 HeapFree(GetProcessHeap(), 0, cc->attr);
+                HeapFree(GetProcessHeap(), 0, cc);
                 return INVALID_HANDLE_VALUE;
             }
             if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_PARAM, i, p, &size))
             {
                 CryptMsgClose(hmsg);
                 HeapFree(GetProcessHeap(), 0, cc->attr);
+                HeapFree(GetProcessHeap(), 0, cc);
                 return INVALID_HANDLE_VALUE;
             }
             p += size;
@@ -939,6 +943,7 @@ HANDLE WINAPI CryptCATOpen(LPWSTR pwszFileName, DWORD fdwOpenFlags, HCRYPTPROV h
         cc->magic = CRYPTCAT_MAGIC;
         return cc;
     }
+    HeapFree(GetProcessHeap(), 0, cc);
     return INVALID_HANDLE_VALUE;
 }
 
index 22e0f0f..d914b8e 100644 (file)
@@ -215,7 +215,7 @@ error_close_key:
  *
  * NOTES
  *   Adding definitions is basically only adding relevant information
- *   to the registry. No verification takes place whether a DLL or it's
+ *   to the registry. No verification takes place whether a DLL or its
  *   entrypoints exist.
  *   Information in the registry will always be overwritten.
  *
@@ -948,10 +948,10 @@ HRESULT WINAPI DllRegisterServer(void)
     TRACE("\n");
 
     /* Testing on native shows that when an error is encountered in one of the CryptRegisterOIDFunction calls
-     * the rest of these calls is skipped. Registering is however continued for the trust providers.
+     * the rest of these calls are skipped. Registering is however continued for the trust providers.
      *
-     * We are not totally in line with native as there all decoding functions are registered after all encoding
-     * functions.
+     * We are not totally in line with native as all decoding functions are registered after all encoding
+     * functions there.
      */
 #define WINTRUST_REGISTEROID( oid, encode_funcname, decode_funcname ) \
     do { \
index ce2f979..74df669 100644 (file)
@@ -212,7 +212,7 @@ reactos/dll/win32/wininet             # Synced to Wine-1.7.1
 reactos/dll/win32/winmm               # Forked at Wine-20050628
 reactos/dll/win32/winmm/midimap       # Forked at Wine-20050628
 reactos/dll/win32/winmm/wavemap       # Forked at Wine-20050628
-reactos/dll/win32/wintrust            # Synced to Wine-1.7.1
+reactos/dll/win32/wintrust            # Synced to Wine-1.7.17
 reactos/dll/win32/wldap32             # Synced to Wine-1.7.1
 reactos/dll/win32/wmi                 # Synced to Wine-1.7.1
 reactos/dll/win32/wtsapi32            # Synced to Wine-1.7.1