Skip Menu |

This queue is for tickets about the Authen-Radius CPAN distribution.

Report information
The Basics
Id: 99161
Status: resolved
Priority: 0/
Queue: Authen-Radius

People
Owner: PORTAONE [...] cpan.org
Requestors: mail [...] eworm.de
Cc:
AdminCc:

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



CC: Christian Hesse <mail [...] eworm.de>
Subject: [PATCH 1/1] fix use of uninitialized value
Date: Fri, 26 Sep 2014 18:40:32 +0200
To: bug-Authen-Radius [...] rt.cpan.org
From: Christian Hesse <mail [...] eworm.de>
I get warning: Use of uninitialized value $vendor_name in hash element at /usr/share/perl5/vendor_perl/Authen/Radius.pm line 440. This fixes the problem and sets $vendor_name to 'not defined'. --- Radius.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Radius.pm b/Radius.pm index db56f23..b88db32 100644 --- a/Radius.pm +++ b/Radius.pm @@ -436,7 +436,8 @@ sub vendorID ($) { return defined $dict_vendor_name{ $attr->{'Vendor'} }{'id'} ? $dict_vendor_name{ $attr->{'Vendor'} }{'id'} : int($attr->{'Vendor'}); } else { # look up vendor by attribute name - my $vendor_name = $dict_name{$attr->{'Name'}}{'vendor'}; + my $vendor_name = defined ($dict_name{$attr->{'Name'}}{'vendor'}) ? + $dict_name{$attr->{'Name'}}{'vendor'} : 'not defined'; my $vendor_id = defined ($dict_vendor_name{$vendor_name}{'id'}) ? $dict_vendor_name{$vendor_name}{'id'} : 'not defined'; return $vendor_id; -- 2.1.1
From: peter [...] morch.com
On Fri Sep 26 12:41:02 2014, mail@eworm.de wrote: Show quoted text
> Use of uninitialized value $vendor_name in hash element at > /usr/share/perl5/vendor_perl/Authen/Radius.pm line 440.
We saw this warning too, and the patch also fixed the issue for us. This issue was not present in 0.17, but is present in 0.24, tested against exactly the same Radius server.