We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
// asn1.c static const char *asn1_tag_index[] = { "[0]", "[1]", "[2]", "[3]", "[4]", "[5]", "[6]", "[7]", "[8]", "[9]", "[10]", "[11]", "[12]", "[13]", "[14]", "[15]", "[16]", "[17]", "[18]", "[19]", "[20]", "[21]", "[22]", "[23]", "[24]", "[25]", "[26]", "[27]", "[28]", "[29]", "[30]", "[31]", }; const char *asn1_tag_name(int tag) { if (tag < 0 || tag > 0xff) { error_print(); return NULL; } switch (tag & 0xc0) { case ASN1_TAG_CONTENT_SPECIFIC: return asn1_tag_index[tag & 0xe0];
tag & 0xe0明显是大于asn1_tag_index[]数组长度32的。这里的tag应该原本是想取后五位的值的。修改成tag|0x1f即可。
tag & 0xe0
asn1_tag_index[]
tag|0x1f
The text was updated successfully, but these errors were encountered:
No branches or pull requests
tag & 0xe0
明显是大于asn1_tag_index[]
数组长度32的。这里的tag应该原本是想取后五位的值的。修改成tag|0x1f
即可。The text was updated successfully, but these errors were encountered: