[lttng-dev] [PATCH babeltrace] Fix: Uninitialized ctf_stream_pos structure in ctf_float_write()
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Thu Oct 31 09:18:53 EDT 2013
Merged, thanks!
Mathieu
----- Original Message -----
> From: "Jérémie Galarneau" <jeremie.galarneau at efficios.com>
> To: lttng-dev at lists.lttng.org
> Sent: Tuesday, October 15, 2013 1:23:33 PM
> Subject: [lttng-dev] [PATCH babeltrace] Fix: Uninitialized ctf_stream_pos structure in ctf_float_write()
>
> 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 at efficios.com>
> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
> formats/ctf/types/float.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/formats/ctf/types/float.c b/formats/ctf/types/float.c
> index 2daadf9..6890283 100644
> --- a/formats/ctf/types/float.c
> +++ b/formats/ctf/types/float.c
> @@ -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;
>
> --
> 1.8.4
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list