mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix buffer overflow
This commit is contained in:
parent
221f8c1cd1
commit
289cd6e10c
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ int msg_to_sample(struct msg *msg, struct sample *smp, struct vlist *signals)
|
|||
smp->sequence = msg->sequence;
|
||||
smp->ts.origin = MSG_TS(msg);
|
||||
|
||||
for (int i = 0; i < smp->length; i++) {
|
||||
for (int i = 0; i < MIN(smp->length, vlist_length(signals)); i++) {
|
||||
struct signal *sig = vlist_at(signals, i);
|
||||
|
||||
switch (sig->type) {
|
||||
|
|
Loading…
Add table
Reference in a new issue