From: Julien Desfossez Date: Mon, 24 Feb 2014 18:34:00 +0000 (-0500) Subject: Fix: missing big endian conversion for one index field X-Git-Tag: v2.4.0~25 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d30430d09b0bba72df4a9eb108c72a0896cfaa7b;p=lttng-tools.git Fix: missing big endian conversion for one index field Signed-off-by: Julien Desfossez Signed-off-by: David Goulet --- diff --git a/src/common/index/index.c b/src/common/index/index.c index a00403420..abc098541 100644 --- a/src/common/index/index.c +++ b/src/common/index/index.c @@ -67,7 +67,7 @@ int index_create_file(char *path_name, char *stream_name, int uid, int gid, hdr.magic = htobe32(CTF_INDEX_MAGIC); hdr.index_major = htobe32(CTF_INDEX_MAJOR); hdr.index_minor = htobe32(CTF_INDEX_MINOR); - hdr.packet_index_len = sizeof(struct ctf_packet_index); + hdr.packet_index_len = htobe32(sizeof(struct ctf_packet_index)); size_ret = lttng_write(fd, &hdr, sizeof(hdr)); if (size_ret < sizeof(hdr)) {