diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2018-01-08 14:10:40 +0100 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2018-01-30 13:28:39 +0100 |
commit | f9150c5fa0ac81a848dbb6978a73c10170648d5b (patch) | |
tree | b0232ad37887961e3b553b68a21b7cbf4ed38172 /ctdb | |
parent | 0766f066af4358c37861fd3c57b58869644a53c0 (diff) | |
download | samba-f9150c5fa0ac81a848dbb6978a73c10170648d5b.tar.gz |
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 <swen@vnet.ibm.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/common/sock_io.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) { |