aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds/message.c')
-rw-r--r--net/rds/message.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/rds/message.c b/net/rds/message.c
index ca50a8ec9742..73e600ffd87f 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -122,8 +122,7 @@ int rds_message_add_extension(struct rds_header *hdr,
122 if (hdr->h_exthdr[0] != RDS_EXTHDR_NONE) 122 if (hdr->h_exthdr[0] != RDS_EXTHDR_NONE)
123 return 0; 123 return 0;
124 124
125 if (type >= __RDS_EXTHDR_MAX 125 if (type >= __RDS_EXTHDR_MAX || len != rds_exthdr_size[type])
126 || len != rds_exthdr_size[type])
127 return 0; 126 return 0;
128 127
129 if (ext_len >= RDS_HEADER_EXT_SPACE) 128 if (ext_len >= RDS_HEADER_EXT_SPACE)