Merge pull request #71 from mscherer/small_cleanup

Do not repeat the size of certdata
This commit is contained in:
Klas Lindfors
2016-05-09 08:57:22 +02:00
+1 -1
View File
@@ -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;
}