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

Alexandre Julliard julliard at winehq.org
Wed Apr 9 05:31:31 CDT 2008


Module: wine
Branch: master
Commit: 5c8473ba780cf26494bfcddce5e2364a20aabc99
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5c8473ba780cf26494bfcddce5e2364a20aabc99

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Tue Apr  8 13:44:01 2008 +0100

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

---

 dlls/advapi32/cred.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/advapi32/cred.c b/dlls/advapi32/cred.c
index ab988da..44de697 100644
--- a/dlls/advapi32/cred.c
+++ b/dlls/advapi32/cred.c
@@ -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);




More information about the wine-cvs mailing list