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: "Gilbert Ramirez Jr." <gram@xxxxxxxxxxxx>
Date: Wed, 6 Oct 1999 21:26:50 -0500 (CDT)
gram        1999/10/06 21:26:47 CDT

  Modified files:
    .                    packet-dns.c 
  Log:
  Fixed the infinite-loop problem in the DNS dissector, at least for
  the random packets I generated. I'm not convinced that all the problems
  are gone. We now:
  
  1. Check that the bytes are indded in the frame before accessing them
  	in dissect_dns_query() and dissect_dns_answer(). If not, we
  	return 0, which means "0-byte increment".
  
  2. Check the return value of the two functions above in
  	dissect_query_records() and dissect_answer_records(), which have
  	loops that call those two functions above. If a 0-byte
  	increment is found, the loop is broken to avoid an infinite loop.
  
  Revision  Changes    Path
  1.22      +25 -7     ethereal/packet-dns.c