CID 325860 (#1 of 1): Dereference before null check (REVERSE_INULL)

This commit is contained in:
Frank Morgner 2018-11-06 15:36:00 +01:00
parent 54c9d65a48
commit 609095a4f4
1 changed files with 4 additions and 4 deletions

View File

@ -1302,13 +1302,13 @@ static int myeid_unwrap_key(struct sc_card *card, const u8 *crgram, size_t crgra
myeid_private_data_t* priv;
int symmetric_operation = 0;
if (card == NULL || crgram == NULL) {
return SC_ERROR_INVALID_ARGUMENTS;
}
LOG_FUNC_CALLED(card->ctx);
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_NORMAL);
if (card == NULL || crgram == NULL) {
LOG_TEST_RET(card->ctx, SC_ERROR_INVALID_ARGUMENTS, "One or more of required arguments was null.\n");
}
if (crgram_len > MYEID_MAX_RSA_KEY_LEN / 8)
LOG_FUNC_RETURN(card->ctx, SC_ERROR_INVALID_ARGUMENTS);