diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-12-13 10:59:33 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-12-13 10:59:33 +0000 |
commit | 4ca1ee0a89b1c67b5331d59919c197de6fcea409 (patch) | |
tree | 44765d2dd704cba961886fc08a60a71af1b13ca2 | |
parent | 77ff57e72ae8dafa5b8945fa963a5c8f6928cf44 (diff) | |
download | wireshark-4ca1ee0a89b1c67b5331d59919c197de6fcea409.tar.gz wireshark-4ca1ee0a89b1c67b5331d59919c197de6fcea409.tar.bz2 wireshark-4ca1ee0a89b1c67b5331d59919c197de6fcea409.zip |
Fix some bit mask tests - & has lower priority than !=, so "a & b != c"
means "a & (b != c)", not "(a & b) != c".
Put in a comment noting a potential problem with defragmentation,
pointed out by a compiler warning that apm_Segmentation_local_ref might
not be set before it's used.
svn path=/trunk/; revision=16779
-rw-r--r-- | epan/dissectors/packet-isup.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c index c2b8742a67..b5ecd613ce 100644 --- a/epan/dissectors/packet-isup.c +++ b/epan/dissectors/packet-isup.c @@ -2999,7 +2999,13 @@ dissect_isup_application_transport_parameter(tvbuff_t *parameter_tvb, packet_inf offset = offset + octet - 2; } } - /* Defragment ? */ + /* + * Defragment ? + * XXX - we can't do that if there's no segmentation local reference, + * as we use the segmentation local reference in the + * fragment_add_seq_next() call. We don't check for that, + * though. + */ if (isup_apm_desegment && si_and_apm_seg_ind != 0xc0){ /* reassembly seems to not work well wid zero length segments */ if ( offset == (gint)length){ @@ -3021,7 +3027,7 @@ dissect_isup_application_transport_parameter(tvbuff_t *parameter_tvb, packet_inf tvb_length_remaining(parameter_tvb, offset), /* fragment length - to the end */ more_frag); /* More fragments? */ - if (((si_and_apm_seg_ind & 0x3f !=0)&&(si_and_apm_seg_ind &0x40 !=0)) ){ + if ((si_and_apm_seg_ind & 0x3f) !=0 && (si_and_apm_seg_ind &0x40) !=0){ /* First fragment set number of fragments */ fragment_set_tot_len(pinfo, apm_Segmentation_local_ref & 0x7f, isup_apm_msg_fragment_table, (si_and_apm_seg_ind & 0x3f)); } |