From d93fc6dcbf9d314d3345c3424ec3d9f00caef04f Mon Sep 17 00:00:00 2001 From: Hyungju Lee Date: Tue, 6 Sep 2022 02:07:35 +0900 Subject: [PATCH] Fix use of bitwise '&' with boolean operands in palrt (#3349) --- src/shared/palrt/bstr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/palrt/bstr.cpp b/src/shared/palrt/bstr.cpp index 2f5ccd9cd4..93c1da7743 100644 --- a/src/shared/palrt/bstr.cpp +++ b/src/shared/palrt/bstr.cpp @@ -47,7 +47,7 @@ inline HRESULT CbSysStringSize(ULONG cchSize, BOOL isByteLen, ULONG *result) else { ULONG temp = 0; // should not use in-place addition in ULongAdd - if (SUCCEEDED(ULongMult(cchSize, sizeof(WCHAR), &temp)) & + if (SUCCEEDED(ULongMult(cchSize, sizeof(WCHAR), &temp)) && SUCCEEDED(ULongAdd(temp, constant, result))) { *result = *result & ~WIN32_ALLOC_ALIGN;