Skip to content

Commit

Permalink
Land #18369, Fix opt address local crash when ipaddr is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
cgranleese-r7 authored Sep 15, 2023
2 parents 85cf00e + 871e1f4 commit ba9f879
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/msf/core/opt_address_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def normalize(value)
addrs = addrs.map { |x| x['addr'].split('%').first }.select do |addr|
begin
IPAddr.new(addr)
rescue IPAddr::InvalidAddressError
rescue IPAddr::Error
false
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/msf/core/opt_address_local_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
# Darwin AF_LINK
18 => [
{
'addr' => '55:44:33:22:11:00',
'addr' => '',
'netmask' => nil,
'broadcast' => nil
}
Expand Down

0 comments on commit ba9f879

Please sign in to comment.