diff --git a/src/libopensc/card-authentic.c b/src/libopensc/card-authentic.c index 2322bc94..99332e55 100644 --- a/src/libopensc/card-authentic.c +++ b/src/libopensc/card-authentic.c @@ -819,7 +819,7 @@ authentic_read_binary(struct sc_card *card, unsigned int idx, struct sc_context *ctx = card->ctx; struct sc_apdu apdu; size_t sz, rest, ret_count = 0; - int rv = SC_SUCCESS; + int rv = SC_ERROR_INVALID_ARGUMENTS; LOG_FUNC_CALLED(ctx); sc_log(ctx, @@ -865,7 +865,7 @@ authentic_write_binary(struct sc_card *card, unsigned int idx, struct sc_context *ctx = card->ctx; struct sc_apdu apdu; size_t sz, rest; - int rv = SC_SUCCESS; + int rv = SC_ERROR_INVALID_ARGUMENTS; LOG_FUNC_CALLED(ctx); sc_log(ctx, @@ -908,7 +908,7 @@ authentic_update_binary(struct sc_card *card, unsigned int idx, struct sc_context *ctx = card->ctx; struct sc_apdu apdu; size_t sz, rest; - int rv = SC_SUCCESS; + int rv = SC_ERROR_INVALID_ARGUMENTS; LOG_FUNC_CALLED(ctx); sc_log(ctx, diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c index a4edb88f..0da867f5 100644 --- a/src/tools/opensc-explorer.c +++ b/src/tools/opensc-explorer.c @@ -490,6 +490,7 @@ static int do_ls(int argc, char **argv) u8 buf[256], *cur = buf; int r, count; + memset(buf, 0, sizeof buf); r = sc_lock(card); if (r == SC_SUCCESS) r = sc_list_files(card, buf, sizeof(buf));