Fix: Filter ABI changes to support FILTER_BYTECODE_MAX_LEN (65536)
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index 842876fb743c857cf519ff5161d8d333d639bd16..be64acd01d03e6b730cec0403a4edda21fbd90ac 100644 (file)
@@ -293,6 +293,14 @@ int handle_message(struct sock_info *sock_info,
                        ret = -EINVAL;
                        goto error;
                }
+
+               if (lum->u.filter.reloc_offset > lum->u.filter.data_size - 1) {
+                       ERR("Filter reloc offset %u is not within data\n",
+                               lum->u.filter.reloc_offset);
+                       ret = -EINVAL;
+                       goto error;
+               }
+
                bytecode = zmalloc(sizeof(*bytecode) + lum->u.filter.data_size);
                if (!bytecode) {
                        ret = -ENOMEM;
This page took 0.025204 seconds and 4 git commands to generate.