diff options
Diffstat (limited to 'kernel/include/net/cipso_ipv4.h')
-rw-r--r-- | kernel/include/net/cipso_ipv4.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/include/net/cipso_ipv4.h b/kernel/include/net/cipso_ipv4.h index 3ebb168b9..a34b141f1 100644 --- a/kernel/include/net/cipso_ipv4.h +++ b/kernel/include/net/cipso_ipv4.h @@ -309,6 +309,10 @@ static inline int cipso_v4_validate(const struct sk_buff *skb, } for (opt_iter = 6; opt_iter < opt_len;) { + if (opt_iter + 1 == opt_len) { + err_offset = opt_iter; + goto out; + } tag_len = opt[opt_iter + 1]; if ((tag_len == 0) || (tag_len > (opt_len - opt_iter))) { err_offset = opt_iter + 1; |