summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proto_ipv4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto_ipv4.c b/proto_ipv4.c
index e2d22d8..e522a90 100644
--- a/proto_ipv4.c
+++ b/proto_ipv4.c
@@ -154,7 +154,7 @@ static void ipv4(struct pkt_buff *pkt)
* check and handle that
*/
opt_len = *(++opt);
- if (opt_len > opts_len) {
+ if (opt_len < 2 || opt_len > opts_len) {
tprintf(", Len (%zd, invalid) ]\n", opt_len);
goto out;
} else