X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-filter-interpreter.c;fp=liblttng-ust%2Flttng-filter-interpreter.c;h=df4add225dbb2585548b6bcb740a4aaa026772b8;hb=4db6ca96415350161cce90319d647f950cd8a62e;hp=29bcaeffa0656cacea08f59f5c6b782bb23c1af7;hpb=353c9dc0b929bf980baabc384ac6a15d1fe856ea;p=lttng-ust.git diff --git a/liblttng-ust/lttng-filter-interpreter.c b/liblttng-ust/lttng-filter-interpreter.c index 29bcaeff..df4add22 100644 --- a/liblttng-ust/lttng-filter-interpreter.c +++ b/liblttng-ust/lttng-filter-interpreter.c @@ -58,8 +58,8 @@ int stack_strcmp(struct estack *stack, int top, const char *cmp_type) for (;;) { int escaped_r0 = 0; - if (unlikely(p - estack_bx(stack, top)->u.s.str > estack_bx(stack, top)->u.s.seq_len || *p == '\0')) { - if (q - estack_ax(stack, top)->u.s.str > estack_ax(stack, top)->u.s.seq_len || *q == '\0') { + if (unlikely(p - estack_bx(stack, top)->u.s.str >= estack_bx(stack, top)->u.s.seq_len || *p == '\0')) { + if (q - estack_ax(stack, top)->u.s.str >= estack_ax(stack, top)->u.s.seq_len || *q == '\0') { return 0; } else { if (estack_ax(stack, top)->u.s.literal) { @@ -70,8 +70,8 @@ int stack_strcmp(struct estack *stack, int top, const char *cmp_type) return -1; } } - if (unlikely(q - estack_ax(stack, top)->u.s.str > estack_ax(stack, top)->u.s.seq_len || *q == '\0')) { - if (p - estack_bx(stack, top)->u.s.str > estack_bx(stack, top)->u.s.seq_len || *p == '\0') { + if (unlikely(q - estack_ax(stack, top)->u.s.str >= estack_ax(stack, top)->u.s.seq_len || *q == '\0')) { + if (p - estack_bx(stack, top)->u.s.str >= estack_bx(stack, top)->u.s.seq_len || *p == '\0') { return 0; } else { if (estack_bx(stack, top)->u.s.literal) {