[Wine-patches] crypt32: Use RegQueryValueEx for REG_BINARY (eterbug #5348).

Alexander Morozov amorozov на etersoft.ru
Пн Апр 26 19:41:11 MSD 2010


----------- следующая часть -----------
From 115df564ad9951e86a7b86a3add422206d9564cd Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Mon, 26 Apr 2010 18:24:14 +0400
Subject: [PATCH] crypt32: Use RegQueryValueEx for REG_BINARY (eterbug #5348).

---
 dlls/crypt32/oid.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c
index 1cdb86d..ba5e722 100644
--- a/dlls/crypt32/oid.c
+++ b/dlls/crypt32/oid.c
@@ -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)
-- 
1.6.5.8



Подробная информация о списке рассылки Wine-patches