avoiding problems due to uninitialized values
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@407 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -305,12 +305,13 @@ static int npa_mse_set_at(struct sm_ctx *oldnpactx, sc_card_t *card,
|
|||||||
NPA_MSE_SET_AT_C *data = NULL;
|
NPA_MSE_SET_AT_C *data = NULL;
|
||||||
int r, tries;
|
int r, tries;
|
||||||
|
|
||||||
|
memset(&apdu, 0, sizeof apdu);
|
||||||
|
|
||||||
if (!sw1 || !sw2) {
|
if (!sw1 || !sw2) {
|
||||||
r = SC_ERROR_INVALID_ARGUMENTS;
|
r = SC_ERROR_INVALID_ARGUMENTS;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&apdu, 0, sizeof apdu);
|
|
||||||
apdu.ins = 0x22;
|
apdu.ins = 0x22;
|
||||||
apdu.p1 = 0xc1;
|
apdu.p1 = 0xc1;
|
||||||
apdu.p2 = 0xa4;
|
apdu.p2 = 0xa4;
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ static int format_data(sc_card_t *card, const struct sm_ctx *ctx,
|
|||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
u8 *pad_data = NULL;
|
u8 *pad_data = NULL;
|
||||||
size_t pad_data_len;
|
size_t pad_data_len = 0;
|
||||||
|
|
||||||
if (!ctx || !formatted_data || !formatted_data_len) {
|
if (!ctx || !formatted_data || !formatted_data_len) {
|
||||||
r = SC_ERROR_INVALID_ARGUMENTS;
|
r = SC_ERROR_INVALID_ARGUMENTS;
|
||||||
|
|||||||
Reference in New Issue
Block a user