Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-smb.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ronnie Sahlberg <sahlberg@xxxxxxxxxxxxxxxxx>
Date: Mon, 10 Nov 2003 02:02:35 -0600 (CST)
sahlberg    2003/11/10 02:02:35 CST

  Modified files:
    .                    packet-smb.c 
  Log:
  Bugfix for ethereal crashes
  
  If the ByteCount field in the SMB PDU spanned beyond the end of the
  packet because the packet was short or because the BC field was corrupted and contained
  garbade data  then the tree item for the command (the subtree just after the SMBHeader subtree) would describe data continuing beyond the end of the
  packet.
  
  If we selected one such tree in the dissect pane and used Prepare/Match Selected  this would cause the filter build thing to try to access data beyod the end
  of the packet and ethereal would dump core.
  
  Change the END_OF_SMB macro so that it shrinks bc so that bc never describes
  data beyond the end of the packet.
  
  Revision  Changes    Path
  1.375     +12 -3     ethereal/packet-smb.c