Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

Commit

Permalink
Filter out negative numbers passed to NumericIPAddr#load_integer.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Nov 6, 2010
1 parent d6fbdaf commit 5e0ad21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dm-core/property/legacy/numeric_ip_addr.rb
Expand Up @@ -66,7 +66,7 @@ def dump(value)
def load_integer(value)
if value > 4294967295 # (2 ** 32) - 1
::IPAddr.new(value,Socket::AF_INET6)
else
elsif value >= 0
::IPAddr.new(value,Socket::AF_INET)
end
end
Expand Down

0 comments on commit 5e0ad21

Please sign in to comment.