aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-04-24 23:59:11 -0400
committerDavid S. Miller <davem@davemloft.net>2018-04-24 23:59:11 -0400
commitc749fa181bd5848be78691d23168ec61ce691b95 (patch)
treed037dc016bd880d9d5b393a30f3907ef5e98124d /net/ipv4/tcp_input.c
parent16f4faa4f06ff3b4e214922d55ac33ab6e2bdbdc (diff)
parent3be4aaf4e2d3eb95cce7835e8df797ae65ae5ac1 (diff)
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.c7
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)
3889 int length = (th->doff << 2) - sizeof(*th); 3889 int length = (th->doff << 2) - sizeof(*th);
3890 const u8 *ptr = (const u8 *)(th + 1); 3890 const u8 *ptr = (const u8 *)(th + 1);
3891 3891
3892 /* If the TCP option is too short, we can short cut */ 3892 /* If not enough data remaining, we can short cut */
3893 if (length < TCPOLEN_MD5SIG) 3893 while (length >= TCPOLEN_MD5SIG) {
3894 return NULL;
3895
3896 while (length > 0) {
3897 int opcode = *ptr++; 3894 int opcode = *ptr++;
3898 int opsize; 3895 int opsize;
3899 3896