1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

ctdb-common: Fix the TCP packet length check

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13520

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2018-07-26 14:51:44 +10:00 committed by Martin Schwenke
parent 3047202ce7
commit be43e08072

View File

@ -775,7 +775,7 @@ int ctdb_sys_read_tcp_packet(int s,
/* make sure its not a short packet */
if (offsetof(struct tcphdr, th_ack) + 4 +
(ip->ip_hl*4) > ret) {
(ip->ip_hl*4) > pkthdr.len) {
return -1;
}
/* TCP */