pteid: Do not overwrite already set information in tokeninfo

Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22578
This commit is contained in:
Jakub Jelen 2020-06-04 16:12:32 +02:00 committed by Frank Morgner
parent f49162af04
commit a5f04188bc
1 changed files with 0 additions and 1 deletions

View File

@ -173,7 +173,6 @@ static int sc_pkcs15emu_pteid_init(sc_pkcs15_card_t * p15card)
sc_log(ctx, "Reading of EF.TOKENINFO failed: %d", rv);
LOG_FUNC_RETURN(ctx, rv);
}
memset(p15card->tokeninfo, 0, sizeof(*p15card->tokeninfo));
rv = sc_pkcs15_parse_tokeninfo(p15card->card->ctx, p15card->tokeninfo,
buf, len);
if (rv != SC_SUCCESS) {