Subject: | dn_compress() produces corrupt packet for name containing empty label |
Date: | Sat, 2 Jun 2007 19:04:23 +0100 |
To: | bug-Net-DNS [...] rt.cpan.org |
From: | "Dick Franks" <rwfranks [...] acm.org> |
Perl 5.008008
Linux 2.6.21-1.3194.fc7 i686
Net::DNS 0.59
code fragment
my $packet = Net::DNS::Packet->new("bad..example.com");
my $corrupt = $packet->data;
my $result = Net::DNS::Packet->new(\$corrupt);
$result->print;
produces
;; HEADER SECTION
;; id = 61229
;; qr = 0 opcode = QUERY aa = 0 tc = 0 rd = 1
;; ra = 0 ad = 0 cd = 0 rcode = NOERROR
;; qdcount = 1 ancount = 0 nscount = 0 arcount = 0
;; QUESTION SECTION (1 record)
;; bad. CLASS30817 TYPE1893
;; ANSWER SECTION (0 records)
;; AUTHORITY SECTION (0 records)
;; ADDITIONAL SECTION (0 records)