From: Fredrik Thulin Date: Fri, 16 Sep 2011 12:07:16 +0000 (+0200) Subject: Fix length in some calls to writer(). X-Git-Tag: v1.6.2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7d0c05e56299cf896bc075134381bc151b1a03a;p=yubikey-personalization.old Fix length in some calls to writer(). No real change, the correct length was used by coincidence. --- diff --git a/ykpers.c b/ykpers.c index acb01fb..c06ebbc 100644 --- a/ykpers.c +++ b/ykpers.c @@ -553,7 +553,7 @@ int ykp_write_config(const YKP_CONFIG *cfg, userdata); /* XXX print OATH-HOTP fixed differently based on oath-fixed-modhex etc. */ writer(str_modhex_prefix, - strlen(str_key_value_separator), + strlen(str_modhex_prefix), userdata); yubikey_modhex_encode(buffer, (char *)cfg->ykcore_config.fixed, cfg->ykcore_config.fixedSize); writer(buffer, strlen(buffer), userdata); @@ -568,7 +568,7 @@ int ykp_write_config(const YKP_CONFIG *cfg, writer("n/a", 3, userdata); } else { writer(str_hex_prefix, - strlen(str_key_value_separator), + strlen(str_hex_prefix), userdata); yubikey_hex_encode(buffer, (char *)cfg->ykcore_config.uid, UID_SIZE); writer(buffer, strlen(buffer), userdata); @@ -581,7 +581,7 @@ int ykp_write_config(const YKP_CONFIG *cfg, strlen(str_key_value_separator), userdata); writer(str_hex_prefix, - strlen(str_key_value_separator), + strlen(str_hex_prefix), userdata); yubikey_hex_encode(buffer, (char *)cfg->ykcore_config.key, KEY_SIZE); if (key_bits_in_uid) { @@ -596,7 +596,7 @@ int ykp_write_config(const YKP_CONFIG *cfg, strlen(str_key_value_separator), userdata); writer(str_hex_prefix, - strlen(str_key_value_separator), + strlen(str_hex_prefix), userdata); yubikey_hex_encode(buffer, (char *)cfg->ykcore_config.accCode, ACC_CODE_SIZE); writer(buffer, strlen(buffer), userdata);