Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-dns.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: Fri, 12 Dec 2003 17:23:57 -0600 (CST)
guy         2003/12/12 17:23:57 CST

  Modified files:
    .                    packet-dns.c 
  Log:
  Add some checks to make sure we're not running past the end of the RR
  we're dissecting.  (Some RR's still don't do that check, as they don't
  maintain an "rr_len" variable, and as "get_dns_name()" doesn't do any
  length checking.)
  
  That obviates the need for having "compute_key_id()" check the length,
  as we won't even get to calling it if the RR is too short.  Have it
  still do a check for sanity, but just abort if the check fails, and have
  it return -1 if the algorithm is unsupported.
  
  Don't bother processing T_CERT RRs if we're not building a protocol
  tree, don't fetch data from a T_CERT RR until we put it into the tree,
  and fix the bug that change found, namely that we were using the wrong
  variable in the "val_to_str()" call for the certificate type.
  
  Revision  Changes    Path
  1.110     +144 -41   ethereal/packet-dns.c