diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-04-30 21:22:15 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-04-30 21:22:15 +0000 |
commit | 5b5a0ced85e253074e8242386381771c959f0385 (patch) | |
tree | d69085c7811975f5af749d36e1def9c71a254434 /epan/dissectors/packet-tacacs.c | |
parent | 3f6b914175e30f1f477a2b60a32d1ac8af6ab9b9 (diff) |
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
Diffstat (limited to 'epan/dissectors/packet-tacacs.c')
-rw-r--r-- | epan/dissectors/packet-tacacs.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |