Fix babeltrace-log uninitialized memory
authorHui Zhu <teawater@gmail.com>
Fri, 7 Sep 2012 12:36:28 +0000 (08:36 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 7 Sep 2012 12:36:28 +0000 (08:36 -0400)
commit36741bea2b53007c29ac0391ee9086722e00653a
treef4ee8eae5e597c97bf963e8e0fa660e8bde33a72
parent2bdfa4cfc433d2c6e07d6474078bb896d1f3697a
Fix babeltrace-log uninitialized memory

Got a crash with babeltrace-log.

../../../babeltrace/include/babeltrace/mmap-align.h:78
index=0, whence=0)
    at ../../../babeltrace/formats/ctf/ctf.c:623
    at ../../../babeltrace/formats/ctf/ctf.c:576
<_IO_2_1_stdin_>)
    at ../../babeltrace/converter/babeltrace-log.c:233
../../babeltrace/converter/babeltrace-log.c:342

This issue because pos is used before it init.  This patch init it in
function ctf_init_pos.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c
This page took 0.024401 seconds and 4 git commands to generate.