From 7f9f4285c2dfb81234c01996f6d33fae07701629 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Tue, 8 Dec 2020 15:37:42 +0300 Subject: [PATCH] bcrypt: Use lstrcmpW() instead of wcscmp(). That was probably missed when backporting upstream 3DES patches. --- dlls/bcrypt/bcrypt_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c index 2270f2b6a070..b3a348ca9dc9 100644 --- a/dlls/bcrypt/bcrypt_main.c +++ b/dlls/bcrypt/bcrypt_main.c @@ -488,14 +488,14 @@ static NTSTATUS generic_alg_property( enum alg_id id, const WCHAR *prop, UCHAR * static NTSTATUS get_3des_property( enum mode_id mode, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size ) { - if (!wcscmp( prop, BCRYPT_BLOCK_LENGTH )) + if (!lstrcmpW( prop, BCRYPT_BLOCK_LENGTH )) { *ret_size = sizeof(ULONG); if (size < sizeof(ULONG)) return STATUS_BUFFER_TOO_SMALL; if (buf) *(ULONG *)buf = BLOCK_LENGTH_3DES; return STATUS_SUCCESS; } - if (!wcscmp( prop, BCRYPT_CHAINING_MODE )) + if (!lstrcmpW( prop, BCRYPT_CHAINING_MODE )) { const WCHAR *str; switch (mode) @@ -509,7 +509,7 @@ static NTSTATUS get_3des_property( enum mode_id mode, const WCHAR *prop, UCHAR * memcpy( buf, str, (lstrlenW(str) + 1) * sizeof(WCHAR) ); return STATUS_SUCCESS; } - if (!wcscmp( prop, BCRYPT_KEY_LENGTHS )) + if (!lstrcmpW( prop, BCRYPT_KEY_LENGTHS )) { BCRYPT_KEY_LENGTHS_STRUCT *key_lengths = (void *)buf; *ret_size = sizeof(*key_lengths); @@ -639,9 +639,9 @@ static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHA switch (alg->id) { case ALG_ID_3DES: - if (!wcscmp( prop, BCRYPT_CHAINING_MODE )) + if (!lstrcmpW( prop, BCRYPT_CHAINING_MODE )) { - if (!wcscmp( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC )) + if (!lstrcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC )) { alg->mode = MODE_ID_CBC; return STATUS_SUCCESS;