Add support for Clang sanitizers for UEFITool

Only applied to CMake Debug builds, useful for debugging undefined behavior.
This commit is contained in:
Nikolaj Schlej 2023-01-31 17:45:29 -08:00
parent 2467b48802
commit b649b98cb5
5 changed files with 29 additions and 10 deletions

View file

@ -472,7 +472,7 @@ INTN findPattern(const UINT8 *pattern, const UINT8 *patternMask, UINTN patternSi
bool matches = true;
for (UINTN i = 0; i < patternSize; i++) {
if ((data[dataOff + i] & patternMask[i]) != pattern[i]) {
matches = true;
matches = false;
break;
}
}
@ -583,4 +583,4 @@ USTATUS zlibDecompress(const UByteArray& input, UByteArray& output)
inflateEnd(&stream);
return ret == Z_STREAM_END ? U_SUCCESS : U_ZLIB_DECOMPRESSION_FAILED;
}
}