Fix: filter bytecode specializer stack leak
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 1 Oct 2012 22:17:58 +0000 (18:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 1 Oct 2012 22:17:58 +0000 (18:17 -0400)
Fixes #356

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-filter-specialize.c

index b422f50863a5f4608405c5c41ca5ed32faf1f61f..66e3db6f7228b379fc9fe0d584f05465d483b404 100644 (file)
@@ -396,6 +396,12 @@ int lttng_filter_specialize_bytecode(struct bytecode_runtime *bytecode)
                case FILTER_OP_AND:
                case FILTER_OP_OR:
                {
+                       /* Continue to next instruction */
+                       /* Pop 1 when jump not taken */
+                       if (vstack_pop(stack)) {
+                               ret = -EINVAL;
+                               goto end;
+                       }
                        next_pc += sizeof(struct logical_op);
                        break;
                }
This page took 0.026086 seconds and 4 git commands to generate.