git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0766f06
)
ctdb-common: Return if packet size is zero
author
Swen Schillig
<swen@vnet.ibm.com>
Mon, 8 Jan 2018 13:10:40 +0000
(14:10 +0100)
committer
Martin Schwenke
<martins@samba.org>
Tue, 30 Jan 2018 12:28:39 +0000
(13:28 +0100)
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>
ctdb/common/sock_io.c
patch
|
blob
|
history
diff --git
a/ctdb/common/sock_io.c
b/ctdb/common/sock_io.c
index 3f7138f0b7f59ec2cdb7b2668d239389819b5018..8a0b9859d01d92af65248a71d668b05731b35f55 100644
(file)
--- 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) {