farsightsec / fstrm

Frame Streams implementation in C
MIT License
59 stars 27 forks source link

fstrm_replay seg fault in fstrm_writer_close #46

Closed reedjc closed 6 years ago

reedjc commented 6 years ago
$ ./src/fstrm_replay -t protobuf:dnstap.Dnstap                  -u /var/run/named/dnstap.sock -r dnstap-log.fstrm
Error: fstrm_writer_open() failed.
Warning: failed to read control frame from dnstap-log.fstrm, skipping
Segmentation fault

gdb:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  fstrm_writer_close (w=0x0) at fstrm/writer.c:302
302             if (w->state != fstrm_writer_state_opened)
(gdb) bt full
#0  fstrm_writer_close (w=0x0) at fstrm/writer.c:302
        res = <optimized out>
#1  0x000055e08acdf1ca in main (argc=<optimized out>, argv=<optimized out>)
    at src/fstrm_replay.c:256
        i = <optimized out>
        res = <optimized out>
        w = 0x0

This also happens with:

./src/fstrm_replay -t protobuf:dnstap.Dnstap                  --tcp /var/run/named/dnstap.sock -r ./t/program_tests/test.fstrm --port whatever
reedjc commented 6 years ago

52 merged to upcoming release branch. Thank you.