aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
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 367def6ddeda..e51c644484dc 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3868,11 +3868,8 @@ const u8 *tcp_parse_md5sig_option(const struct tcphdr *th)
3868 int length = (th->doff << 2) - sizeof(*th); 3868 int length = (th->doff << 2) - sizeof(*th);
3869 const u8 *ptr = (const u8 *)(th + 1); 3869 const u8 *ptr = (const u8 *)(th + 1);
3870 3870
3871 /* If the TCP option is too short, we can short cut */ 3871 /* If not enough data remaining, we can short cut */
3872 if (length < TCPOLEN_MD5SIG) 3872 while (length >= TCPOLEN_MD5SIG) {
3873 return NULL;
3874
3875 while (length > 0) {
3876 int opcode = *ptr++; 3873 int opcode = *ptr++;
3877 int opsize; 3874 int opsize;
3878 3875