From: Swen Schillig Date: Mon, 8 Jan 2018 13:10:40 +0000 (+0100) Subject: ctdb-common: Return if packet size is zero X-Git-Tag: tevent-0.9.36~262 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9150c5fa0ac81a848dbb6978a73c10170648d5b;p=thirdparty%2Fsamba.git ctdb-common: Return if packet size is zero Prevent further processing of sock_queue_process if the received packet size is zero. Signed-off-by: Swen Schillig Reviewed-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- diff --git a/ctdb/common/sock_io.c b/ctdb/common/sock_io.c index 3f7138f0b7f..8a0b9859d01 100644 --- a/ctdb/common/sock_io.c +++ b/ctdb/common/sock_io.c @@ -231,6 +231,7 @@ static void sock_queue_process(struct sock_queue *queue) if (pkt_size == 0) { D_ERR("Invalid packet of length 0\n"); queue->callback(NULL, 0, queue->private_data); + return; } if ((queue->end - queue->begin) < pkt_size) {