oberthur: Handle 1B OIDs

Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32807
This commit is contained in:
Jakub Jelen 2021-04-06 12:45:24 +02:00 committed by Jakub Jelen
parent 4b3c6dec07
commit cae5c71f90
1 changed files with 1 additions and 1 deletions

View File

@ -973,7 +973,7 @@ sc_pkcs15emu_oberthur_add_data(struct sc_pkcs15_card *p15card,
free(info_blob);
LOG_TEST_RET(ctx, SC_ERROR_UNKNOWN_DATA_RECEIVED, "Invalid length of 'oid' received");
}
if (oid_len) {
if (oid_len > 2) {
oid = info_blob + offs + 2;
if (*oid != 0x06 || (*(oid + 1) != oid_len - 2)) {
free(info_blob);