Skip to content

Commit

Permalink
Fix use of bitwise '&' with boolean operands in palrt (dotnet#3349)
Browse files Browse the repository at this point in the history
  • Loading branch information
HJLeee committed Jun 14, 2023
1 parent b20d544 commit d93fc6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/palrt/bstr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d93fc6d

Please sign in to comment.