diff --git a/src/net_helper.c b/src/net_helper.c index 6b46bfe5e..e71abd9b0 100644 --- a/src/net_helper.c +++ b/src/net_helper.c @@ -110,9 +110,8 @@ static int sample_conv_eth_vlan(const struct arg *arg_p, struct sample *smp, voi smp->flags &= ~SMP_F_CONST; return !!vlan; } - if (idx + 4 < smp->data.u.str.data) + if (idx + 4 > smp->data.u.str.data) break; - vlan = read_n16(smp->data.u.str.area + idx + 2) & 0xfff; } /* incomplete header */