From ff6711944727e7a628934ef3bbc97c796e542f4c Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 4 May 2016 23:17:43 +0200 Subject: [PATCH] Do not repeat the size of certdata --- tool/yubico-piv-tool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/yubico-piv-tool.c b/tool/yubico-piv-tool.c index 934d8d1..3878b54 100644 --- a/tool/yubico-piv-tool.c +++ b/tool/yubico-piv-tool.c @@ -557,7 +557,7 @@ static bool import_cert(ykpiv_state *state, enum enum_key_format cert_format, int object = get_object_id(slot); ykpiv_rc res; - if(4 + cert_len + 5 > 3072) { /* 4 is prefix size, 5 is postfix size */ + if(4 + cert_len + 5 > sizeof(certdata)) { /* 4 is prefix size, 5 is postfix size */ fprintf(stderr, "Certificate is to large to fit in buffer.\n"); goto import_cert_out; }