Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal/epan proto.c

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

From: Guy Harris <guy@xxxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2003 22:57:39 -0500 (CDT)
guy         2003/06/04 22:57:39 CDT

  Modified files:
    epan                 proto.c 
  Log:
  When "proto_tree_add_item()" is used with FT_STRINGZ with a length
  value, just copy the specified number of bytes and stick a '\0' at the
  end, don't use "tvb_get_nstringz0()" - yes, you end up copying more
  bytes, but you don't have to bother looking for a '\0' that might not
  even be present (if the string is null-padded rather than
  null-terminated).
  
  Also, set the length of the item to the specified length, rather than to
  the length up to the terminating '\0' - if the string is null-padded,
  the field should include all the padding bytes.
  
  Revision  Changes    Path
  1.88      +34 -11    ethereal/epan/proto.c