summaryrefslogtreecommitdiff
path: root/print-ip6opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'print-ip6opts.c')
-rw-r--r--print-ip6opts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print-ip6opts.c b/print-ip6opts.c
index 7ed8c013..5cf8ba4a 100644
--- a/print-ip6opts.c
+++ b/print-ip6opts.c
@@ -52,7 +52,7 @@ ip6_sopt_print(netdissect_options *ndo, const u_char *bp, int len)
optlen = 1;
else {
if (i + 1 < len)
- optlen = bp[i + 1] + 2;
+ optlen = EXTRACT_U_1(bp + i + 1) + 2;
else
goto trunc;
}
@@ -98,7 +98,7 @@ ip6_opt_print(netdissect_options *ndo, const u_char *bp, int len)
optlen = 1;
else {
if (i + 1 < len)
- optlen = bp[i + 1] + 2;
+ optlen = EXTRACT_U_1(bp + i + 1) + 2;
else
goto trunc;
}