diff --git a/src/peers.c b/src/peers.c index 276e5cece..9a0f3cbdf 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1609,8 +1609,11 @@ static int peer_treat_updatemsg(struct appctx *appctx, struct peer *p, int updt, dc = p->dcache; if (*msg_cur == end) { /* Dictionary entry key without value. */ - if (id > dc->max_entries) - break; + if (id > dc->max_entries) { + TRACE_PROTO("malformed message", PEERS_EV_UPDTMSG, + NULL, p, NULL, &id); + goto malformed_unlock; + } /* IDs sent over the network are numbered from 1. */ de = dc->rx[id - 1].de; }