Fix: Uninitialized ctf_stream_pos structure in ctf_float_write()
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 15 Oct 2013 17:23:33 +0000 (13:23 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 31 Oct 2013 13:18:26 +0000 (09:18 -0400)
This structure is passed to _ctf_float_copy() which uses the
uninitialized mmap_offset and offset values to read the source
floating point value.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/types/float.c

index 2daadf91e40de1325832d39e867ab6ff38e826f0..689028360d4fe8f258d307e014e54103fb03201e 100644 (file)
@@ -232,7 +232,7 @@ int ctf_float_write(struct bt_stream_pos *ppos, struct bt_definition *definition
        union doubleIEEE754 u;
        struct bt_definition *tmpdef;
        struct definition_float *tmpfloat;
-       struct ctf_stream_pos srcp;
+       struct ctf_stream_pos srcp = { { 0 } };
        struct mmap_align mma;
        int ret;
 
This page took 0.02457 seconds and 4 git commands to generate.