Subject: | infinite loop? |
Date: | Mon, 9 Dec 2013 02:51:04 -0800 (PST) |
To: | "bug-Net-DNS-Dig [...] rt.cpan.org" <bug-Net-DNS-Dig [...] rt.cpan.org> |
From: | "Max V. Bouglacoff" <vesemir [...] ymail.com> |
Hello,
I've recently found that qurying 'ebay.com' for ANY makes the module to fall into infinite loop.
Here is a code example:
============
use Net::DNS::Dig;
my $dig = Net::DNS::Dig->new();
my $rr = $dig->for('ebay.com', 'ANY')->to_text();
foreach my $r (@{$rr->{AUTHORITY}}, @{$rr->{ANSWER}}, @{$rr->{ADDITIONAL}}) {
my $rdata = join(' ', @{$r->{RDATA}});
print "$r->{NAME} $r->{TYPE} $rdata\n";
}
=============
Executing this will never return and eat all available memory.
Used: Net::DNS 0.73 and Net::DNS::Dig 0.07
Tested on perl 5.12.4 and 5.16.1, recent gentoo x64, modules installed via cpan.
--
respects,
Max V. Bouglacoff, MB535-UANIC