diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-10-14 22:55:51 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-10-14 22:55:51 +0000 |
commit | 0181043045ffbd6d77424c3798c6504515422d30 (patch) | |
tree | e0e383ab4dc1c9ff5b029fa30ee12a980e1212fb | |
parent | bb68b6cf4f17e6ace4092e577cf66cf375ae0ed3 (diff) | |
download | wireshark-0181043045ffbd6d77424c3798c6504515422d30.tar.gz |
Copy over revisions from trunk:
------------------------------------------------------------------------
r45548 | guy | 2012-10-14 15:53:25 -0700 (Sun, 14 Oct 2012) | 2 lines
Clean up the "round up to a multiple of 4" code a bit.
------------------------------------------------------------------------
r45524 | eapache | 2012-10-13 15:12:52 -0700 (Sat, 13 Oct 2012) | 9 lines
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7858
Use a full 32-bit literal instead of just a 16-bit one. Fixes case where
the value we're &-ing with just slips over 2^16, making us get stuck
in an infinite loop.
I'm not sure this matches the iscsi spec anymore, the comment in the code
about padding bytes is ambiguous as to whether they're leading or trailing.
svn path=/trunk-1.8/; revision=45549
-rw-r--r-- | epan/dissectors/packet-iscsi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c index c2255506fe..f00d8def48 100644 --- a/epan/dissectors/packet-iscsi.c +++ b/epan/dissectors/packet-iscsi.c @@ -1003,8 +1003,8 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off } /* strip off padding bytes */ - if(ahs_offset&0x0003){ - ahs_offset=(ahs_offset+3)&0xfffc; + if(ahs_offset & 3){ + ahs_offset=(ahs_offset+3) & ~3; } } |