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:
parent
6ccb8c674c
commit
1cc9c2177d
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue