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

file: prevent stack corruption when reading first sample

This commit is contained in:
Georg Reinke 2017-07-07 11:27:03 +02:00
parent 6ccb8c674c
commit 1cc9c2177d

View file

@ -267,6 +267,7 @@ int file_start(struct node *n)
/* Get timestamp of first line */
if (f->read_epoch_mode != FILE_EPOCH_ORIGINAL) {
struct sample s;
s.capacity = 0;
ret = sample_io_villas_fscan(f->read.handle->file, &s, NULL);
if (ret < 0)
@ -402,4 +403,4 @@ static struct plugin p = {
};
REGISTER_PLUGIN(&p)
LIST_INIT_STATIC(&p.node.instances)
LIST_INIT_STATIC(&p.node.instances)