Fix babeltrace-log uninitialized memory (v2)
[babeltrace.git] / converter / babeltrace-log.c
index d3470774c589a22b143232b58add5df9f892c85b..7f31d015226548969abfa515046ece454732dce9 100644 (file)
@@ -20,6 +20,7 @@
  * Depends on glibc 2.10 for getline().
  */
 
+#define _GNU_SOURCE
 #include <config.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -229,6 +230,7 @@ void trace_text(FILE *input, int output)
        char *line = NULL, *nl;
        size_t linesize;
 
+       memset(&pos, 0, sizeof(pos));
        ctf_init_pos(&pos, output, O_RDWR);
 
        write_packet_header(&pos, s_uuid);
This page took 0.033676 seconds and 4 git commands to generate.