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, 19 Nov 2003 23:20:18 -0600 (CST)
guy         2003/11/19 23:20:18 CST

  Modified files:
    epan                 proto.c 
  Log:
  Use "tvb_get_string()" in "proto_tree_set_string_tvb()" - it won't leak
  memory if it throws an exception, as it checks whether the entire string
  is in the tvbuff *before* allocating a buffer for it, and that also
  means that if the length is absurdly large, an exception will be thrown,
  rather than the memory allocation failing.
  
  Revision  Changes    Path
  1.104     +2 -4      ethereal/epan/proto.c