Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-ipdc.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: Sat, 20 Mar 2004 02:01:08 -0600 (CST)
guy         2004/03/20 02:01:08 CST

  Modified files:
    .                    packet-ipdc.c 
  Log:
  "tmp_tag_text" can hold a string of up to 255 characters, which means it
  needs to be 256 characters long to hold a maximum-length string plus a
  terminating '\0', as noted by Stefan Esser.
  
  Don't bother putting in the null terminator at the end in the case where
  we're putting an IP address or address/port into "tmp_tag_text" -
  "sprintf()" does that for you.
  
  In the case where it's an IP address and port, do it all in one sprintf
  call - I don't think there's a guarantee that
  
  	sprintf(tmp_tag_text, "%s:%u", tmp_tag_text, ...)
  
  works, although it could work.
  
  Also, handle the case where the length is neither 4 (IP address) nor 6
  (IP address/port).
  
  Revision  Changes    Path
  1.3       +13 -9     ethereal/packet-ipdc.c