Skip to content
Snippets Groups Projects
Commit 2d0572e9 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

fix crash due to buffer overflow

parent bfde62c9
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ void TecDummy::read(uint8_t bar, uint32_t address, int32_t* data, size_t sizeInB
assert(reply.size() == nFrames * frameLength);
// convert reply back into byte stream
for(size_t i = 0; i < reply.length(); ++i) {
for(size_t i = 0; i < reply.length() / 4; ++i) {
uint32_t word;
std::memcpy(&word, &(reply[4 * i]), 4);
reg_command[i] = htonl(word);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment