aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smb.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-10-01 08:53:12 +0000
committerGuy Harris <guy@alum.mit.edu>2003-10-01 08:53:12 +0000
commit28eb53f033e40f6a9c9e3bafcd1b7ad61c350ec3 (patch)
tree423bbd0e3e2d0837e2d326853338e871b1ab9faa /packet-smb.c
parentbe2736adcf8ac583c2d56e37db9ef01f391913f9 (diff)
The max count high field is 32 bits, and, in order to compare it
against 0xffffffff, it has to be extracted into a 32-bit variable. svn path=/trunk/; revision=8575
Diffstat (limited to 'packet-smb.c')
-rw-r--r--packet-smb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/packet-smb.c b/packet-smb.c
index 531b155e52..cdef41bad6 100644
--- a/packet-smb.c
+++ b/packet-smb.c
@@ -3,7 +3,7 @@
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
* 2001 Rewrite by Ronnie Sahlberg and Guy Harris
*
- * $Id: packet-smb.c,v 1.371 2003/09/29 19:17:34 jmayer Exp $
+ * $Id: packet-smb.c,v 1.372 2003/10/01 08:53:12 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -5258,7 +5258,8 @@ static int
dissect_read_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, proto_tree *smb_tree)
{
guint8 wc, cmd=0xff;
- guint16 andxoffset=0, bc, maxcnt_low, maxcnt_high;
+ guint16 andxoffset=0, bc, maxcnt_low;
+ guint32 maxcnt_high;
guint32 maxcnt=0;
guint32 ofs = 0;
smb_info_t *si;
@@ -5326,13 +5327,13 @@ dissect_read_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
*
* Perhaps the 32-bit timeout field was hijacked as a 16-bit
* high count and a 16-bit reserved field.
+ *
+ * We fetch and display it as 32 bits.
*
* XXX if maxcount high is 0xFFFFFFFF we assume it is just padding
* bytes and we just ignore it.
*/
- /* Amasingly enough, this really is 4 bytes, according to the SNIA spec */
maxcnt_high = tvb_get_letohl(tvb, offset);
- /* XXX Argh! maxcnt_high is guint16 and thus 16 bit -> always false !!! */
if(maxcnt_high==0xffffffff){
maxcnt_high=0;
} else {