1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-07 10:43:58 +00:00

Fix memory access

This commit is contained in:
Carles Fernandez
2022-06-15 07:02:52 +02:00
parent cc50da1425
commit 8b84158b18
2 changed files with 2 additions and 2 deletions

View File

@@ -133,7 +133,7 @@ int unpack_2bit_samples::work(int noutput_items,
// Handle endian swap if needed
if (swap_endian_items_)
{
work_buffer_.reserve(ninput_bytes);
work_buffer_ = std::vector<int8_t>(ninput_bytes);
swapEndianness(in, work_buffer_, item_size_, ninput_items);
in = const_cast<signed char const *>(&work_buffer_[0]);