Only look at first byte for end of data detection.
That way not only 0,0 and ff,ff is recognized and 0,ff,ff,ff... will not cause trouble. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1073 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
07668a30ff
commit
1c121b1430
|
@ -1036,7 +1036,7 @@ static int asn1_decode(struct sc_context *ctx, struct sc_asn1_entry *asn1,
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if ((p[0] == 0 && p[1] == 0) || (p[0] == 0xFF && p[1] == 0xFF))
|
if (p[0] == 0 || p[0] == 0xFF)
|
||||||
return SC_ERROR_ASN1_END_OF_CONTENTS;
|
return SC_ERROR_ASN1_END_OF_CONTENTS;
|
||||||
for (idx = 0; asn1[idx].name != NULL; idx++) {
|
for (idx = 0; asn1[idx].name != NULL; idx++) {
|
||||||
entry = &asn1[idx];
|
entry = &asn1[idx];
|
||||||
|
|
Loading…
Reference in New Issue