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

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

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Dec 2000 17:48:15 -0600 (CST)
guy         2000/12/25 17:48:15 CST

  Modified files:
    .                    packet-tftp.c 
  Log:
  Add a new "tvb_strsize()" routine, which finds the size of a
  NUL-terminated string, starting at a given offset.  The size includes
  the terminating NUL.  If it doesn't find the terminating NUL, it throws
  the appropriate exception, as either there's no terminating NUL in the
  packet or there is but it's past the end of the captured data in the
  packet.
  
  Use that routine in the TFTP dissector.  As it throws an exception if
  the string isn't NUL-terminated, we can just use "%s" to print option
  strings; we don't need to use "%.*s" with a string length.
  
  Revision  Changes    Path
  1.21      +11 -39    ethereal/packet-tftp.c