Fix: accept 65536 bytes long bytecodes
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Aug 2012 19:17:47 +0000 (15:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Aug 2012 19:17:47 +0000 (15:17 -0400)
We were limited to 65535.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-abi.h
liblttng-ust/lttng-filter.c

index 766a7e6a9b11c3f85844dffa2378f0c47d0c4cca..a72d67ef6ce837e2187a3632425f16a8255fdb4f 100644 (file)
@@ -171,7 +171,7 @@ struct lttng_ust_calibrate {
        } u;
 };
 
-#define FILTER_BYTECODE_MAX_LEN                65535
+#define FILTER_BYTECODE_MAX_LEN                65536
 struct lttng_ust_filter_bytecode {
        uint16_t len;
        uint16_t reloc_offset;
index 369e73aa0ade218959ce2e9185d638be29d33c50..68a5931158140ec735fb67ccacee9a71958407bb 100644 (file)
@@ -184,7 +184,7 @@ int apply_field_reloc(struct ltt_event *event,
                return -EINVAL;
 
        /* Check if field offset is too large for 16-bit offset */
-       if (field_offset > FILTER_BYTECODE_MAX_LEN)
+       if (field_offset > FILTER_BYTECODE_MAX_LEN - 1)
                return -EINVAL;
 
        /* set type */
This page took 0.026028 seconds and 4 git commands to generate.