mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复Ipv4Util.getEndIpLong 取反符号导致数据越界
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# 🚀Changelog
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.22(2023-08-16)
|
||||
# 5.8.22(2023-08-21)
|
||||
|
||||
### 🐣新特性
|
||||
* 【core 】 NumberUtil.nullToZero增加重载(issue#I7PPD2@Gitee)
|
||||
@@ -22,6 +22,7 @@
|
||||
* 【core 】 去除默认的ACCEPT_LANGUAGE(issue#3258@Github)
|
||||
* 【core 】 修复FieldsComparator比较结果不正确问题(issue#3259@Github)
|
||||
* 【core 】 修复Db.findAll全局忽略大小写无效问题(issue#I7T30Y@Gitee)
|
||||
* 【core 】 修复Ipv4Util.getEndIpLong 取反符号导致数据越界(issue#I7U1OQ@Gitee)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.21(2023-07-29)
|
||||
|
@@ -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