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

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

From: guy@xxxxxxxxxxxx (Guy Harris)
Date: Fri, 19 Dec 2003 16:31:40 -0600 (CST)
guy         2003/12/19 16:31:40 CST

  Modified files:
    .                    packet-smpp.c 
  Log:
  Don't store the result of "tvb_reported_length()" into a "guint8" - it
  could be more than 255 (even if that "shouldn't happen").
  
  Don't use "frags != 0" as an indication that the message was fragmented
  - that can't handle bogus packets with a zero fragment count.  Have an
  explicit variable for that.
  
  Check that "sm_data_len" isn't 0 before attempting dissection or
  reassembly.
  
  Check that "frag" and "frags" aren't zero before attempting reassembly
  (arguably, we should report both of those as errors).
  
  Use "process_reassembled_data()" to do the bulk of the work for
  reassembly - it handles the case where a "fragmented" packet has only
  one fragment.  This fixes a crash that occurred when only the last
  fragment was seen, although there's an underlying problem there, namely
  that the hack tha "fragment_add_seq_check()" does to handle some
  problems with some 802.11 captures causes it to consider a packet where
  the first fragment seen is also the last fragment as a one-fragment
  packet; we probably need to do that *only* for 802.11.
  
  Revision  Changes    Path
  1.22      +33 -13    ethereal/packet-smpp.c