mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
ProfileData: Avoid UB when reading
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206674 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1907b94222
commit
e382065b82
@ -222,8 +222,9 @@ public:
|
|||||||
static std::pair<offset_type, offset_type>
|
static std::pair<offset_type, offset_type>
|
||||||
ReadKeyDataLength(const unsigned char *&D) {
|
ReadKeyDataLength(const unsigned char *&D) {
|
||||||
using namespace support;
|
using namespace support;
|
||||||
return std::make_pair(endian::readNext<offset_type, little, unaligned>(D),
|
offset_type KeyLen = endian::readNext<offset_type, little, unaligned>(D);
|
||||||
endian::readNext<offset_type, little, unaligned>(D));
|
offset_type DataLen = endian::readNext<offset_type, little, unaligned>(D);
|
||||||
|
return std::make_pair(KeyLen, DataLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
StringRef ReadKey(const unsigned char *D, unsigned N) {
|
StringRef ReadKey(const unsigned char *D, unsigned N) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user