diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-05-25 19:39:35 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-05-25 19:39:35 +0000 |
commit | 88f69b80c0b4a4c476d00c1207b99d26d84e8e6a (patch) | |
tree | 7a7704250e4683890454d704ebbcf9a29e1d56df /epan | |
parent | 4e008159c8106611c06f4dcf2d023fdaaa29e8bf (diff) |
Make SND_SEQ an array of 2 guint32's, rather than an array of 8
guint8's, to squelch some compiler warnings (and clean up some
comparisons).
svn path=/trunk/; revision=21941
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-spnego.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c index 3d5ce7f017..db129a7df4 100644 --- a/epan/dissectors/packet-spnego.c +++ b/epan/dissectors/packet-spnego.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* .\packet-spnego.c */ +/* ./packet-spnego.c */ /* ../../tools/asn2wrs.py -b -e -p spnego -c spnego.cnf -s packet-spnego-template spnego.asn */ /* Input file: packet-spnego-template.c */ @@ -968,7 +968,9 @@ decrypt_arcfour(packet_info *pinfo, int ret; gint32 seq_number; size_t datalen; - guint8 k6_data[16], SND_SEQ[8], Confounder[8]; + guint8 k6_data[16]; + guint32 SND_SEQ[2]; + guint8 Confounder[8]; guint8 cksum_data[8]; int cmp; int conf_flag; @@ -1006,14 +1008,9 @@ decrypt_arcfour(packet_info *pinfo, memset(k6_data, 0, sizeof(k6_data)); } - seq_number=g_ntohl(*((guint32 *)SND_SEQ)); + seq_number=g_ntohl(SND_SEQ[0]); - cmp = memcmp(&SND_SEQ[4], "\xff\xff\xff\xff", 4); - if(cmp){ - cmp = memcmp(&SND_SEQ[4], "\x00\x00\x00\x00", 4); - } - - if (cmp != 0) { + if (SND_SEQ[1] != 0xFFFFFFFF && SND_SEQ[1] != 0x00000000) { return -6; } @@ -1642,7 +1639,7 @@ void proto_register_spnego(void) { "", HFILL }}, /*--- End of included file: packet-spnego-hfarr.c ---*/ -#line 1023 "packet-spnego-template.c" +#line 1020 "packet-spnego-template.c" }; /* List of subtrees */ @@ -1663,7 +1660,7 @@ void proto_register_spnego(void) { &ett_spnego_InitialContextToken, /*--- End of included file: packet-spnego-ettarr.c ---*/ -#line 1032 "packet-spnego-template.c" +#line 1029 "packet-spnego-template.c" }; /* Register protocol */ |