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

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 25 Jun 2000 19:13:26 -0500 (CDT)
guy         2000/06/25 19:13:24 CDT

  Modified files:
    .                    packet-snmp.c 
  Log:
  Rename "format_value()" to "format_var()", and have it dynamically
  allocate the buffer into which it formats the variable value, and return
  that value.  This
  
  	1) makes it more closely resemble the formatting routine in the
  	   libsmi-based "packet-snmp.c" under development;
  
  	2) makes it less likely to overrun the buffer (we can't be
  	   certain how long the string "sprint_value()" generates will
  	   be, but we can make a reasonable guess as to the maximum size
  	   based on the type and size of the object we're formatting).
  
  When *not* using "-lsnmp", dynamically allocate the buffers into which
  we format octet strings and OID values, based on the size of the object
  we're formatting, so that we don't overrun the buffer.
  
  Revision  Changes    Path
  1.39      +60 -9     ethereal/packet-snmp.c