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

Prevent reading past the closing tag of a cov subscription #135

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Serialize/ASN1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2358,7 +2358,7 @@ public static int decode_cov_subscription(byte[] buffer, int offset, int apduLen
return -1;
len += decode_unsigned(buffer, offset + len, lenValueType, out value.TimeRemaining);

if (len < apduLen && IS_OPENING_TAG(buffer[offset + len]))
if (len < apduLen && !IS_CLOSING_TAG(buffer[offset + len]))
{
decode_tag_number_and_value(buffer, offset + len, out tagNumber, out lenValueType);
if (tagNumber != 4)
Expand Down
Loading