Commit 7d72397a authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

cryptui: LoadStringW gets characters as size, not bytes.

parent afdd2191
...@@ -923,7 +923,7 @@ static void get_cert_usages(PCCERT_CONTEXT cert, LPWSTR *str) ...@@ -923,7 +923,7 @@ static void get_cert_usages(PCCERT_CONTEXT cert, LPWSTR *str)
size = MAX_STRING_LEN * sizeof(WCHAR); size = MAX_STRING_LEN * sizeof(WCHAR);
*str = malloc(size); *str = malloc(size);
if (*str) if (*str)
LoadStringW(hInstance, IDS_ALLOWED_PURPOSE_NONE, *str, size); LoadStringW(hInstance, IDS_ALLOWED_PURPOSE_NONE, *str, MAX_STRING_LEN);
} }
} }
else else
...@@ -931,7 +931,7 @@ static void get_cert_usages(PCCERT_CONTEXT cert, LPWSTR *str) ...@@ -931,7 +931,7 @@ static void get_cert_usages(PCCERT_CONTEXT cert, LPWSTR *str)
size = MAX_STRING_LEN * sizeof(WCHAR); size = MAX_STRING_LEN * sizeof(WCHAR);
*str = malloc(size); *str = malloc(size);
if (*str) if (*str)
LoadStringW(hInstance, IDS_ALLOWED_PURPOSE_ALL, *str, size); LoadStringW(hInstance, IDS_ALLOWED_PURPOSE_ALL, *str, MAX_STRING_LEN);
} }
} }
......
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