Commit 5c8473ba authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

advapi32: Array parameters are passed to function as pointers so lose size information.

parent 60501aa9
......@@ -82,7 +82,7 @@ static DWORD read_credential_blob(HKEY hkey, const BYTE key_data[KEY_SIZE],
else if (type != REG_BINARY)
return ERROR_REGISTRY_CORRUPT;
key.Length = key.MaximumLength = sizeof(key_data);
key.Length = key.MaximumLength = KEY_SIZE;
key.Buffer = (unsigned char *)key_data;
data.Length = data.MaximumLength = *credential_blob_size;
......@@ -442,7 +442,7 @@ static DWORD write_credential_blob(HKEY hkey, LPCWSTR target_name, DWORD type,
struct ustring key;
DWORD ret;
key.Length = key.MaximumLength = sizeof(key_data);
key.Length = key.MaximumLength = KEY_SIZE;
key.Buffer = (unsigned char *)key_data;
encrypted_credential_blob = HeapAlloc(GetProcessHeap(), 0, credential_blob_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment