mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-12 23:34:21 +00:00
[routing] Fix crash on 32-bit devices with conditional access
The deserialization of conditional road access data was using size_t which is 8 bytes on 64-bit (where maps are generated) but only 4 bytes on 32-bit devices. This caused stream misalignment and eventual std::length_error when garbage data was interpreted as a huge vector size. Fix by using uint64_t to always read 8 bytes, matching what 64-bit build servers write. Signed-off-by: Henry Sternberg <henry@bluelightmaps.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
0da7869c5b
commit
e3abbc712b
@@ -458,7 +458,7 @@ private:
|
||||
positionsAccessConditional.clear();
|
||||
|
||||
auto openingHoursDeserializer = GetOpeningHoursSerDesForRouting();
|
||||
auto const size = ReadPrimitiveFromSource<size_t>(src);
|
||||
auto const size = ReadPrimitiveFromSource<uint64_t>(src);
|
||||
|
||||
positionsAccessConditional.reserve(size);
|
||||
uint32_t prevFeatureId = 0;
|
||||
|
||||
Reference in New Issue
Block a user