crypt32: Use RegQueryValueEx for REG_BINARY (eterbug #5348).
authorAlexander Morozov <amorozov на etersoft.ru>
Mon, 26 Apr 2010 14:24:14 +0000 (18:24 +0400)
committerDenis Baranov <baraka@etersoft.ru>
Tue, 4 May 2010 14:04:05 +0000 (18:04 +0400)
dlls/crypt32/oid.c

index 1cdb86d11db4ec65ca69d2deadb6a45c7ec3e4da..ba5e72205b4846b9af352aae578e8a4100d1bd77 100644 (file)
@@ -1464,8 +1464,8 @@ static void update_oid_info(void)
     struct OIDInfo *info;
     HKEY hKey, hSubKey;
     char buf[MAX_PATH], *ptr, *endptr;
-    DWORD size, id, i = 0;
-    LONG ret, oid_size, name_size, extra_size;
+    DWORD size, extra_size, id, i = 0;
+    LONG ret, oid_size, name_size;
     int found = 0, err = 0;
 
     if (RegOpenKeyW(HKEY_LOCAL_MACHINE, wszCryptDllFindOIDInfoKey, &hKey))
@@ -1505,7 +1505,7 @@ static void update_oid_info(void)
         name_size = 0;
         RegQueryValueW(hSubKey, wszName, NULL, &name_size);
         extra_size = 0;
-        RegQueryValueW(hSubKey, wszExtraInfo, NULL, &extra_size);
+        RegQueryValueExW(hSubKey, wszExtraInfo, NULL, NULL, NULL, &extra_size);
         oid_size = strlen(buf) + 1;
 
         info = CryptMemAlloc(sizeof(*info) + oid_size + name_size + extra_size);
@@ -1532,8 +1532,8 @@ static void update_oid_info(void)
             {
                 info->info.ExtraInfo.pbData =
                  (BYTE *)((char *)(info + 1) + oid_size + name_size);
-                if (RegQueryValueW(hSubKey, wszExtraInfo,
-                 (LPWSTR)info->info.ExtraInfo.pbData, &extra_size))
+                if (RegQueryValueExW(hSubKey, wszExtraInfo, NULL, NULL,
+                 info->info.ExtraInfo.pbData, &extra_size))
                     err = 1;
             }
             if (!err)