add handle error: SignatureType

This commit is contained in:
free will committed 2021-03-16 10:22:31 +08:00
1 parent c5e2af1b27
commit b8e6896585
1 file changed
+6 -1
+6 -1
View File
@@ -141,7 +141,12 @@ public class SignatureType implements TlvComponentBase, IEncodingAble {
}
// 尝试从 TLE-VALUE 中读取出一个非负整数
long result= TLV.readNonNegativeInteger(block.getValue(),0,block.getLength().getVlIntValue2Int());
long result= 0;
try {
result = TLV.readNonNegativeInteger(block.getValue(),0,block.getLength().getVlIntValue2Int());
} catch (VlIntException e) {
throw new Error("SignatureType.wireDecode: Invalid SignatureType TLV");
}
if(result<0){
return false;
}