Skip to content

Commit

Permalink
egk-tool: fix missed initialisation of card pointer
Browse files Browse the repository at this point in the history
If util_connect_card_ex() fails, sc_disconnect_card() will use a
random pointer leading to segmentation faults.
  • Loading branch information
akemnade authored and frankmorgner committed May 2, 2019
1 parent 209be72 commit c3a9458
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/egk-tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ main (int argc, char **argv)
struct gengetopt_args_info cmdline;
struct sc_path path;
struct sc_context *ctx;
struct sc_card *card;
struct sc_card *card = NULL;
unsigned char *data = NULL;
size_t data_len = 0;
int r;
Expand Down

0 comments on commit c3a9458

Please sign in to comment.