summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proto_icmpv6.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/proto_icmpv6.c b/proto_icmpv6.c
index 6eb7ae0..35ed1ae 100644
--- a/proto_icmpv6.c
+++ b/proto_icmpv6.c
@@ -560,7 +560,15 @@ static int8_t dissect_neighb_disc_ops_15(struct pkt_buff *pkt,
tprintf("Padding (");
while (pad_len--) {
- tprintf("%x", *pkt_pull(pkt,1));
+ uint8_t *data = pkt_pull(pkt, 1);
+
+ if (data == NULL) {
+ tprintf("%sINVALID%s", colorize_start_full(black, red),
+ colorize_end());
+ break;
+ }
+
+ tprintf("%x", *data);
}
tprintf(")");