From: Hyungju Lee Date: Mon, 5 Sep 2022 17:07:35 +0000 (+0900) Subject: Fix use of bitwise '&' with boolean operands in palrt (#3349) X-Git-Tag: accepted/tizen/unified/riscv/20231226.055542~51^2~1^2~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e178a1dfa3d4a0c387924f3db53690c21a069bc;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Fix use of bitwise '&' with boolean operands in palrt (#3349) --- diff --git a/src/shared/palrt/bstr.cpp b/src/shared/palrt/bstr.cpp index 2f5ccd9cd..93c1da774 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;