[Wine-patches] [eter-1.0.12] [eterhack] crypt32: Fix pwszName initialization (eterbug #7119).
Alexander Morozov
amorozov на etersoft.ru
Вт Авг 16 19:27:30 MSD 2011
----------- следующая часть -----------
From 04d91c18e65fa54b5623d43ff7870c7005e5bd17 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Tue, 16 Aug 2011 19:06:30 +0400
Subject: [PATCH] crypt32: Fix pwszName initialization (eterbug #7119).
---
dlls/crypt32/oid.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c
index 0e20c55..3ce8721 100644
--- a/dlls/crypt32/oid.c
+++ b/dlls/crypt32/oid.c
@@ -1566,8 +1566,8 @@ static void update_oid_info(void)
struct OIDInfo *info;
HKEY hKey, hSubKey;
char buf[MAX_PATH], *ptr, *endptr;
- DWORD size, extra_size, id, i = 0;
- LONG ret, oid_size, name_size;
+ DWORD size, name_size, extra_size, id, i = 0;
+ LONG ret, oid_size;
int found = 0, err = 0;
if (RegOpenKeyW(HKEY_LOCAL_MACHINE, wszCryptDllFindOIDInfoKey, &hKey))
@@ -1605,7 +1605,7 @@ static void update_oid_info(void)
continue;
*ptr = 0;
name_size = 0;
- RegQueryValueW(hSubKey, wszName, NULL, &name_size);
+ RegQueryValueExW(hSubKey, wszName, NULL, NULL, NULL, &name_size);
extra_size = 0;
RegQueryValueExW(hSubKey, wszExtraInfo, NULL, NULL, NULL, &extra_size);
oid_size = strlen(buf) + 1;
@@ -1626,8 +1626,7 @@ static void update_oid_info(void)
if (name_size)
{
info->info.pwszName = (LPWSTR)((char *)(info + 1) + oid_size);
- if (RegQueryValueW(hSubKey, wszName, (LPWSTR)info->info.pwszName,
- &name_size))
+ if (RegQueryValueExW(hSubKey, wszName, NULL, NULL, (LPBYTE)info->info.pwszName, &name_size))
err = 1;
}
if (extra_size)
--
1.7.6
Подробная информация о списке рассылки Wine-patches