Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add try{} catch(){} in BerTlvParser class #16

Open
oduconge opened this issue Dec 14, 2019 · 0 comments
Open

add try{} catch(){} in BerTlvParser class #16

oduconge opened this issue Dec 14, 2019 · 0 comments

Comments

@oduconge
Copy link

Some tags on the card are not in standard format or have some problem, but the rest is fine. If you do not catch this exception, all information is lost when the parcel is made.

add try{} catch(){} in BerTlvParser class at line 84

int lengthBytesCount;
int valueLength;
try {
	lengthBytesCount = getLengthBytesCount(aBuf, aOffset + tagBytesCount);
	valueLength = getDataLength(aBuf, aOffset + tagBytesCount);
}catch (Exception e){
	lengthBytesCount = 0;
	valueLength = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant