From f9150c5fa0ac81a848dbb6978a73c10170648d5b Mon Sep 17 00:00:00 2001 From: Swen Schillig Date: Mon, 8 Jan 2018 14:10:40 +0100 Subject: [PATCH] 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 --- ctdb/common/sock_io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ctdb/common/sock_io.c b/ctdb/common/sock_io.c index 3f7138f0b7f5..8a0b9859d01d 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) { -- 2.34.1