(mode) snmp_standard::mode::stringvalue - fix infinite loop (#3769)

This commit is contained in:
qgarnier 2022-07-11 10:16:40 +02:00 committed by GitHub
parent 16c0cfdcd3
commit 69569136a0
1 changed files with 1 additions and 3 deletions

View File

@ -242,9 +242,7 @@ sub change_macros {
my ($self, %options) = @_;
my $value = $self->{option_results}->{'format_' . $options{severity}};
while ($value =~ /%\{(.*?)\}/g) {
$value =~ s/%\{($1)\}/$self->{macros}->{$1}/eg;
}
$value =~ s/%\{(.*?)\}/$self->{macros}->{$1}/g;
return $value;
}