Skip to content

Commit

Permalink
Move the code to set "max_data" in "dissect_nbss()" earlier, so that
Browse files Browse the repository at this point in the history
it's set before we dissect continuations.

svn path=/trunk/; revision=538
  • Loading branch information
guyharris committed Aug 21, 1999
1 parent 9e251e6 commit ad09683
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packet-nbns.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
* Much stuff added by Guy Harris <guy@netapp.com>
*
* $Id: packet-nbns.c,v 1.25 1999/08/21 08:45:09 sharpe Exp $
* $Id: packet-nbns.c,v 1.26 1999/08/21 17:59:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
Expand Down Expand Up @@ -1277,6 +1277,12 @@ dissect_nbss(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (flags & NBSS_FLAGS_E)
length += 65536;

/*
* XXX - we should set this based on both "pi.captured_len"
* and "length"....
*/
max_data = pi.captured_len - offset;

/* Hmmm, it may be a continuation message ... */

#define RJSHACK 1
Expand Down Expand Up @@ -1308,7 +1314,6 @@ dissect_nbss(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
val_to_str(msg_type, message_types, "Unknown (%x)"));
}

max_data = pi.captured_len - offset;
while (max_data > 0) {
len = dissect_nbss_packet(pd, offset, fd, tree, max_data);
offset += len;
Expand Down

0 comments on commit ad09683

Please sign in to comment.