aboutsummaryrefslogtreecommitdiffstats
path: root/packet-netbios.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-09-14 07:10:13 +0000
committerGuy Harris <guy@alum.mit.edu>2001-09-14 07:10:13 +0000
commit1d42c94b05cf2e4ec056d780b919a05159a17b72 (patch)
treef03564f0bad20129e2a6ef83bc198287372a9cae /packet-netbios.c
parente32028f6cd3ea4a18a7364fbb32affb4077217d0 (diff)
Make the resolution for time values be nanoseconds rather than
microseconds. Fix some "signed vs. unsigned" comparison warnings. svn path=/trunk/; revision=3934
Diffstat (limited to 'packet-netbios.c')
-rw-r--r--packet-netbios.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/packet-netbios.c b/packet-netbios.c
index 4a2f5ca98e..d6b48a68f1 100644
--- a/packet-netbios.c
+++ b/packet-netbios.c
@@ -5,12 +5,11 @@
*
* derived from the packet-nbns.c
*
- * $Id: packet-netbios.c,v 1.34 2001/06/18 02:17:49 guy Exp $
+ * $Id: packet-netbios.c,v 1.35 2001/09/14 07:10:05 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -27,8 +26,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -1037,10 +1034,11 @@ dissect_netbios(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
(dissect_netb[ command])( tvb, offset, netb_tree);
}
- /* Test for SMB data */
- if ( tvb_length(tvb)> ( hdr_len + 4)){ /* if enough data */
+ offset += hdr_len; /* move past header */
+
+ /* Test for SMB data */
- offset += hdr_len; /* move past header */
+ if (tvb_bytes_exist(tvb, offset, 4)){ /* if enough data */
if (( tvb_get_guint8( tvb, offset) == 0xff) && /* if SMB marker */
( tvb_get_guint8( tvb, offset + 1) == 'S') &&