mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复Ipv4Util.getEndIpLong 取反符号导致数据越界
This commit is contained in:
@@ -407,7 +407,7 @@ public class Ipv4Util {
|
||||
*/
|
||||
public static Long getEndIpLong(String ip, int maskBit) {
|
||||
return getBeginIpLong(ip, maskBit)
|
||||
+ ~ipv4ToLong(getMaskByMaskBit(maskBit));
|
||||
+ (0xffffffffL & ~ipv4ToLong(getMaskByMaskBit(maskBit)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user