fixed printing non primitive tag

fixes undefined bitshift
This commit is contained in:
Frank Morgner 2019-05-06 23:11:20 +02:00
parent 1423c6bb90
commit 3c83a80b57

View File

@ -395,7 +395,7 @@ static void print_tags_recursive(const u8 * buf0, const u8 * buf,
} else {
printf(" %s %-2u",
classes[cla >> 6],
i == 1 ? tag & SC_ASN1_TAG_PRIMITIVE : tag & (((unsigned int) ~0) >> (i + 1) * 8));
i == 1 ? tag & SC_ASN1_TAG_PRIMITIVE : tag & (((unsigned int) ~0) >> (i-1)*8));
}
if (!((cla & SC_ASN1_TAG_CLASS) == SC_ASN1_TAG_UNIVERSAL
&& tag == SC_ASN1_TAG_NULL && len == 0)) {