From 5b5a0ced85e253074e8242386381771c959f0385 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 30 Apr 2007 21:22:15 +0000 Subject: Use memcpy() to copy the session ID to the buffer, so we don't get warnings from the compiler about pointer value alignment. svn path=/trunk/; revision=21629 --- epan/dissectors/packet-tacacs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-tacacs.c') diff --git a/epan/dissectors/packet-tacacs.c b/epan/dissectors/packet-tacacs.c index e9d431b9b6..2ba94872bf 100644 --- a/epan/dissectors/packet-tacacs.c +++ b/epan/dissectors/packet-tacacs.c @@ -352,7 +352,7 @@ tacplus_decrypted_tvb_setup( tvbuff_t *tvb, tvbuff_t **dst_tvb, packet_info *pin /* TODO Check the possibility to use pinfo->decrypted_data */ /* session_id is in NETWORK Byte Order, and is used as byte array in the md5_xor */ - tvb_memcpy(tvb, (guint8*)session_id, 4,4); + tvb_memcpy(tvb, session_id, 4,4); buff = tvb_memdup(tvb, TAC_PLUS_HDR_SIZE, len); @@ -1135,7 +1135,7 @@ md5_xor( guint8 *data, const char *key, int data_len, guint8 *session_id, guint8 mdp = md5_buff; - *(guint32*)mdp = *(guint32*)session_id; + memcpy(mdp, session_id, 4); mdp += 4 ; memcpy(mdp, key, strlen(key)); mdp += strlen(key); -- cgit v1.2.3