1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

villas_human: fix buffer overflow

This commit is contained in:
Steffen Vogel 2019-02-01 08:48:53 +01:00
parent 991fd6e93e
commit fbe08f4473

View file

@ -227,7 +227,7 @@ void villas_human_header(struct io *io, const struct sample *smp)
fprintf(f, "(sequence)");
if (io->flags & SAMPLE_HAS_DATA) {
for (int i = 0; i < smp->length; i++) {
for (int i = 0; i < MIN(smp->length, vlist_length(smp->signals)); i++) {
struct signal *sig = (struct signal *) vlist_at(smp->signals, i);
if (sig->name)