Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fixed out of bounds access in ASN.1 Octet string
Credit to OSS-Fuzz
  • Loading branch information
frankmorgner committed Aug 27, 2019
1 parent 412a614 commit a3fc769
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libopensc/asn1.c
Expand Up @@ -1469,7 +1469,7 @@ static int asn1_decode_entry(sc_context_t *ctx,struct sc_asn1_entry *entry,

/* Strip off padding zero */
if ((entry->flags & SC_ASN1_UNSIGNED)
&& obj[0] == 0x00 && objlen > 1) {
&& objlen > 1 && obj[0] == 0x00) {
objlen--;
obj++;
}
Expand Down

0 comments on commit a3fc769

Please sign in to comment.