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: Sun, 24 Dec 2000 14:33:05 -0600 (CST)
guy         2000/12/24 14:33:05 CST

  Modified files:
    .                    packet-tftp.c 
  Log:
  Add a "tftp_strnlen()" routine that
  
  	1) checks to make sure that the terminating '\0' is found in the
  	   string, and throws a BoundsError exception if it isn't (TFTP
  	   packets should fit in a single frame, so if the '\0' isn't
  	   found, that's an error);
  
  	2) adds 1 to the length to include the trailing '\0';
  
  and use it to find all string lengths, so that we properly handle short
  or malformed frames.
  
  Revision  Changes    Path
  1.20      +52 -22    ethereal/packet-tftp.c