From 07c73200e4d52cb33ef8666c7c7b1064d05f75e2 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Mon, 2 Feb 2015 10:19:15 +0100 Subject: [PATCH] calculate offsets properly --- lib/ykpiv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ykpiv.c b/lib/ykpiv.c index bc6ffbb..c92226e 100644 --- a/lib/ykpiv.c +++ b/lib/ykpiv.c @@ -424,7 +424,7 @@ ykpiv_rc ykpiv_set_mgmkey(ykpiv_state *state, const unsigned char *new_key) { if(DES_is_weak_key(&key_tmp) == 1) { if(state->verbose) { fprintf(stderr, "Won't set new key '"); - dump_hex(new_key + i, 8); + dump_hex(new_key + i * 8, 8); fprintf(stderr, "' since it's considered weak.\n"); } return YKPIV_GENERIC_ERROR;