修复bytehelper & VlInt中的已知bug

This commit is contained in:
ghy committed 2021-03-15 20:46:03 +08:00
1 parent 227d10a391
commit 2ad446ca2c
29 files changed
+315 -80

No files matched your search

+6 -1
View File
@@ -91,7 +91,12 @@ public class TTL implements IEncodingAble {
if(!TLV.expectType(block.getType(),new VlInt(TLV.TlvTTL))){
return false;
}
long value=TLV.readNonNegativeInteger(block.getValue(),0,block.getLength().getVlIntValue2Int());
long value= 0;
try {
value = TLV.readNonNegativeInteger(block.getValue(),0,block.getLength().getVlIntValue2Int());
} catch (VlIntException e) {
e.printStackTrace();
}
if(value<0){
return false;
}