X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=lttng-filter.c;h=4c053fbbfb1208bb94b00bb279bf463b49226ce0;hb=refs%2Fheads%2Fstable-2.12;hp=ec6fd576097af828dbe3dfa064691ca3545119b4;hpb=79282ffdd4f0ad1237f99dcc1f0b36f81d797452;p=lttng-modules.git diff --git a/lttng-filter.c b/lttng-filter.c index ec6fd576..4c053fbb 100644 --- a/lttng-filter.c +++ b/lttng-filter.c @@ -455,6 +455,11 @@ int _lttng_filter_event_link_bytecode(struct lttng_event *event, runtime->len = filter_bytecode->bc.reloc_offset; /* copy original bytecode */ memcpy(runtime->code, filter_bytecode->bc.data, runtime->len); + /* Validate bytecode load instructions before relocs. */ + ret = lttng_filter_validate_bytecode_load(runtime); + if (ret) { + goto link_error; + } /* * apply relocs. Those are a uint16_t (offset in bytecode) * followed by a string (field name).