mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
Fix out of bounds vector access
This commit is contained in:
parent
3e787eeb85
commit
11b84bc2b9
1 changed files with 1 additions and 1 deletions
|
@ -514,7 +514,7 @@ int SlaveNode::_write(Sample *samples[], unsigned sample_count)
|
|||
|
||||
// update last_values
|
||||
this->output.last_values_mutex.lock();
|
||||
for (unsigned i = 0; i < sample->length; i++) {
|
||||
for (unsigned i = 0; i < MIN(sample->length, this->output.last_values.size()); i++) {
|
||||
this->output.last_values[i] = sample->data[i];
|
||||
}
|
||||
this->output.last_values_mutex.unlock();
|
||||
|
|
Loading…
Add table
Reference in a new issue