added null string removal in CDP info

This commit is contained in:
Max Baker
2004-10-28 21:40:11 +00:00
parent d5afa9f592
commit 02f3e91c5d

View File

@@ -77,9 +77,21 @@ $INIT = 0;
%MUNGE = ( %MUNGE = (
'c_capabilities' => \&munge_caps, 'c_capabilities' => \&munge_caps,
'c_platform' => \&munge_null,
'c_domain' => \&munge_null,
'c_port' => \&munge_null,
'c_id' => \&munge_null,
'c_ver' => \&munge_null,
'c_ip' => \&SNMP::Info::munge_ip 'c_ip' => \&SNMP::Info::munge_ip
); );
# munge_null() - removes nulls (\0)
sub munge_null {
my $text = shift || return;
$text =~ s/\0//g;
return $text;
}
sub munge_caps { sub munge_caps {
my $caps = shift; my $caps = shift;