mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-13 06:34:42 -04:00
Enable building ffsparser_fuzzer during CI/CD, improve readUnaligned to silence Clang UBSAN
This commit is contained in:
parent
ff42cecb07
commit
369f10188c
2 changed files with 30 additions and 2 deletions
|
@ -70,7 +70,7 @@ INTN findPattern(const UINT8 *pattern, const UINT8 *patternMask, UINTN patternSi
|
|||
template <typename T>
|
||||
inline T readUnaligned(const T *v) {
|
||||
T tmp = {};
|
||||
memcpy(&tmp, v, sizeof(T));
|
||||
memcpy(reinterpret_cast<void*>(&tmp), reinterpret_cast<const void*>(v), sizeof(T));
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue