From: Mathieu Desnoyers Date: Mon, 27 Aug 2012 19:17:47 +0000 (-0400) Subject: Fix: accept 65536 bytes long bytecodes X-Git-Tag: v2.1.0-rc1~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5b4839a83a25b95484a4689082fb44bcc8906ef9;p=lttng-ust.git Fix: accept 65536 bytes long bytecodes We were limited to 65535. Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/ust-abi.h b/include/lttng/ust-abi.h index 766a7e6a..a72d67ef 100644 --- a/include/lttng/ust-abi.h +++ b/include/lttng/ust-abi.h @@ -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; diff --git a/liblttng-ust/lttng-filter.c b/liblttng-ust/lttng-filter.c index 369e73aa..68a59311 100644 --- a/liblttng-ust/lttng-filter.c +++ b/liblttng-ust/lttng-filter.c @@ -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 */