Use 64-bit type for packet and content size
authorJuha Niskanen <juniskane@gmail.com>
Mon, 13 Feb 2012 13:33:58 +0000 (08:33 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 13 Feb 2012 13:33:58 +0000 (08:33 -0500)
commit7e18eedf5333dbd6f1e0a8d873a7275dee1ed396
tree093b5ea18ea36878e39aaa04f7ce9b06d2afc05e
parente669e45e7fdff6b855907cde40524ebf4cc8a3bc
Use 64-bit type for packet and content size

Expression filestats.st_size * CHAR_BIT wraps around very easily
when stored to 32-bit size_t. Currently BabelTrace cannot handle
input larger than 256Mb because of this and diagnostic messages
from this function can be incorrect because of overflow.

This patch fixes my immediate problem, but further work is needed
for proper large file support i.e. handling files bigger than 2Gb.

Signed-off-by: Juha Niskanen <juniskane@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c
include/babeltrace/ctf/types.h
This page took 0.024387 seconds and 4 git commands to generate.