mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798500 - FTBFS (tests failure) on armhf
Ensure the transition_times are correctly aligned for their sizes before attempting to copy them into the transitions vector.
This commit is contained in:
parent
3125352d5a
commit
26b009c0f4
@ -446,15 +446,23 @@ namespace IANAParser
|
|||||||
auto info_index = info_index_zero + index;
|
auto info_index = info_index_zero + index;
|
||||||
if (transition_size == 4)
|
if (transition_size == 4)
|
||||||
{
|
{
|
||||||
transitions.push_back(
|
int32_t transition_time;
|
||||||
{*(endian_swap(reinterpret_cast<int32_t*>(&fileblock[fb_index]))),
|
// Ensure correct alignment for ARM.
|
||||||
static_cast<uint8_t>(fileblock[info_index])});
|
memcpy(&transition_time,
|
||||||
|
endian_swap(reinterpret_cast<int32_t*>(&fileblock[fb_index])),
|
||||||
|
sizeof(int32_t));
|
||||||
|
auto info = static_cast<uint8_t>(fileblock[info_index]);
|
||||||
|
transitions.push_back({transition_time, info});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
transitions.push_back(
|
int64_t transition_time;
|
||||||
{*(endian_swap(reinterpret_cast<int64_t*>(&fileblock[fb_index]))),
|
// Ensure correct alignment for ARM.
|
||||||
static_cast<uint8_t>(fileblock[info_index])});
|
memcpy(&transition_time,
|
||||||
|
endian_swap(reinterpret_cast<int64_t*>(&fileblock[fb_index])),
|
||||||
|
sizeof(int64_t));
|
||||||
|
auto info = static_cast<uint8_t>(fileblock[info_index]);
|
||||||
|
transitions.push_back({transition_time, info});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user