From: Christopher Faulet Date: Thu, 24 Nov 2016 13:53:22 +0000 (+0100) Subject: BUG: spoe: Fix parsing of SPOE actions in ACK frames X-Git-Tag: v1.7.0~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5cff60ef571f84881cfee98e2ffc5efe91d1b3b;p=thirdparty%2Fhaproxy.git BUG: spoe: Fix parsing of SPOE actions in ACK frames For "SET-VAR" actions, data was not correctly parsed. 'idx' variable was not correctly updated when the 3rd argument was parsed. --- diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 0b722b6754..776848e487 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -2017,8 +2017,10 @@ process_spoe_actions(struct stream *s, struct spoe_context *ctx, goto skip; memset(&smp, 0, sizeof(smp)); smp_set_owner(&smp, s->be, s->sess, s, dir|SMP_OPT_FINAL); - if (decode_spoe_data(p+idx, p+size, &smp) == -1) + + if ((i = decode_spoe_data(p+idx, p+size, &smp)) == -1) goto skip; + idx += i; SPOE_PRINTF(stderr, "%d.%06d [SPOE/%-15s] %s: stream=%p" " - set-var '%s.%s.%.*s'\n",