Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 1740
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: rt-cpan [...] triv.org
Requestors: selsky [...] columbia.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.29
Fixed in: (no value)



Subject: uninitialized value in Question.pm
Use of uninitialized value in pack at /opt/perl5.6.1/lib/site_perl/5.6.1/Net/DNS/Question.pm line 160. It doesn't check to make sure the record type of valid. In this case I'm trying to pass it an MV record type, instead of MX. my $res = new Net::DNS::Resolver; my $query = $res->query("foo.bar.com", 'MV'); The error is getting throw in Question.pm, but perhaps it could be trapped earlier, say in Resolver.pm at around line 594. You could validate the requested type in $Net::DNS::typesbyname{uc($self->{"qtype"}) and do the same thing for the class to prevent bogus classes...
[guest - Tue Oct 29 22:04:52 2002]: Show quoted text
> Use of uninitialized value in pack at > /opt/perl5.6.1/lib/site_perl/5.6.1/Net/DNS/Question.pm line 160. > > It doesn't check to make sure the record type of valid. In this case > I'm trying to pass it an MV record type, instead of MX. > > my $res = new Net::DNS::Resolver; > > my $query = $res->query("foo.bar.com", 'MV'); > > The error is getting throw in Question.pm, but perhaps it could be > trapped earlier, say in Resolver.pm at around line 594. > > You could validate the requested type in > $Net::DNS::typesbyname{uc($self->{"qtype"}) and do the same thing for > the class to prevent bogus classes...
Sorry at the delay in getting back to you. Net::DNS shoudl probably check for a valid question type before precending too far. I will look into this before the next CPAN release. -- Chris Reinhardt ctriv@dyndns.org Systems Architect Dynamic DNS Network Services http://www.dyndns.org/