summaryrefslogtreecommitdiff
path: root/proto_icmpv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto_icmpv6.c')
-rw-r--r--proto_icmpv6.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/proto_icmpv6.c b/proto_icmpv6.c
index 35ed1ae..77c89b1 100644
--- a/proto_icmpv6.c
+++ b/proto_icmpv6.c
@@ -550,13 +550,21 @@ static int8_t dissect_neighb_disc_ops_15(struct pkt_buff *pkt,
tprintf("Pad Len (%zu) ", pad_len);
name_len = len - pad_len;
-
+
tprintf("Name (");
while (name_len--) {
- tprintf("%c", *pkt_pull(pkt,1));
+ uint8_t *data = pkt_pull(pkt, 1);
+
+ if (data == NULL) {
+ tprintf("%sINVALID%s", colorize_start_full(black, red),
+ colorize_end());
+ return 0;
+ }
+
+ tprintf("%c", *data);
}
tprintf(") ");
-
+
tprintf("Padding (");
while (pad_len--) {