trace-cmd: Fix writing of uncompressed size
PATCH 1/1 trace-cmd: Fix writing of uncompressed size
From: Sven Schnelle <[email protected]>
pointer in struct tracecmd_compression is 'unsigned long', which is 8 byte in size on most platforms, but the tep_read_number() call in the next line treats it as a 4 byte value. As there's no need for unsigned long change the type to unsigned int.
Fixes 3f8447b1 ("trace-cmd library: Add support for compression algorithms")
Signed-off-by Sven Schnelle <[email protected]>
Signed-off-by Steven Rostedt (Google) <[email protected]>
--- lib/trace-cmd/trace-compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/trace-cmd/trace-compress.c +1 -1
@@ -32,7 +32,7 @@ struct tracecmd_compression {int fd;unsigned int capacity;unsigned int capacity_read; -unsigned long pointer; +unsigned int pointer;char *buffer;struct compress_proto *proto;struct tep_handle *tep;
Signature · 1 line
2.36.1