You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (length == 3 && (s > (1 << 23) || s < -(1 << 24))) {
thrownewRuntimeException("s is granter than 2^23 or less then -2^23");
}
if (length == 2 && (s > Short.MAX_VALUE || s < Short.MIN_VALUE)) {
thrownewRuntimeException("Number exceed short value: " + s);
}
类:com.yuqi.protocol.utils.IOUtils
方法:writeLengthEncodedInteger , writeInteger
问题:
writeLengthEncodedInteger方法里的这2个分支的条件
与writeInteger方法里的校验条件不匹配,数据范围不能完全覆盖,传入后会报错过大
2 << 16 = 131072
但是进入writeInteger后,超过Short.MAX_VALUE就会报错
The text was updated successfully, but these errors were encountered: