jcop: coverity scan warning RETURN_LOCAL

CID 402623: Pointer to local outside scope (RETURN_LOCAL)
This commit is contained in:
Viktor Tarasov 2012-06-11 19:59:36 +02:00
parent 629c0e8df4
commit 62eb0d05d7
1 changed files with 2 additions and 1 deletions

View File

@ -641,7 +641,8 @@ static int jcop_set_security_env(sc_card_t *card,
tmp.algorithm_ref |= 0x10;
if (tmp.algorithm_flags & SC_ALGORITHM_RSA_HASH_MD5)
tmp.algorithm_ref |= 0x20;
env=&tmp;
memcpy(env, &tmp, sizeof(struct sc_security_env));
}
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0x22, 0xC1, 0);