From 7063b3ae251be32e727b3bfd9dad28bb8ed0a075 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 15 Jan 2000 04:17:37 +0000 Subject: Fix up a bunch of places where a pointer into the packet buffer was cast to a type requiring 2-byte or better alignment and was then dereferenced; doing that requires that the code generated by your compiler not trap if it makes an unaligned reference, and on most RISC processors the code generated by the compiler *will* trap on an unaligned reference by default. svn path=/trunk/; revision=1480 --- packet-ipv6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packet-ipv6.c') diff --git a/packet-ipv6.c b/packet-ipv6.c index 3c30156391..f40f475d9d 100644 --- a/packet-ipv6.c +++ b/packet-ipv6.c @@ -1,7 +1,7 @@ /* packet-ipv6.c * Routines for IPv6 packet disassembly * - * $Id: packet-ipv6.c,v 1.25 1999/11/16 11:42:36 guy Exp $ + * $Id: packet-ipv6.c,v 1.26 2000/01/15 04:17:36 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -196,7 +196,7 @@ dissect_opts(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, if (p[1] == 4) { proto_tree_add_text(dstopt_tree, p - pd, p[1] + 2, "Jumbo payload: %u (%d bytes)", - ntohl(*(guint32 *)&p[2]), p[1] + 2); + pntohl(&p[2]), p[1] + 2); } else { proto_tree_add_text(dstopt_tree, p - pd, p[1] + 2, "Jumbo payload: Invalid length (%d bytes)", @@ -210,7 +210,7 @@ dissect_opts(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, char *rta; if (p[1] == 2) { - rta = val_to_str(ntohs(*(guint16 *)&p[2]), rtalertvals, + rta = val_to_str(pntohs(&p[2]), rtalertvals, "Unknown"); } else rta = "Invalid length"; -- cgit v1.2.3