diff options
author | David S. Miller <davem@davemloft.net> | 2018-04-24 23:59:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-24 23:59:11 -0400 |
commit | c749fa181bd5848be78691d23168ec61ce691b95 (patch) | |
tree | d037dc016bd880d9d5b393a30f3907ef5e98124d /net/ipv4/tcp_input.c | |
parent | 16f4faa4f06ff3b4e214922d55ac33ab6e2bdbdc (diff) | |
parent | 3be4aaf4e2d3eb95cce7835e8df797ae65ae5ac1 (diff) | |
download | linux-c749fa181bd5848be78691d23168ec61ce691b95.tar.gz linux-c749fa181bd5848be78691d23168ec61ce691b95.tar.bz2 linux-c749fa181bd5848be78691d23168ec61ce691b95.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 5a17cfc75326..8acbe5fd2098 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3889,11 +3889,8 @@ const u8 *tcp_parse_md5sig_option(const struct tcphdr *th) int length = (th->doff << 2) - sizeof(*th); const u8 *ptr = (const u8 *)(th + 1); - /* If the TCP option is too short, we can short cut */ - if (length < TCPOLEN_MD5SIG) - return NULL; - - while (length > 0) { + /* If not enough data remaining, we can short cut */ + while (length >= TCPOLEN_MD5SIG) { int opcode = *ptr++; int opsize; |