Commit 95de82a5 authored by anonym's avatar anonym

Avoid use of uninitialized value in restricted-network-detector.

If NetworkManager decides that a wireless connection has timed out
before "supplicant connection state" has occued, our idea of the state
is `undef`, so it cannot be used in a string comparison. Hence, let's
initialize the state to the empty string instead of `undef`.

Will-fix: #7689
parent d133a9b9
......@@ -61,7 +61,7 @@ while(my $sl = $parser->next) {
# The beginning of *all* (not only wireless) new
# connections. We drop any previous state so it won't
# interfere.
$state{$1} = undef;
$state{$1} = "";
} elsif ($text =~ /\(([^)]+)\): supplicant connection state:.*-> (.*)$/) {
# Wireless connection state transition.
$state{$1} = $2;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment