cast cert_len to size_t shouldn't be negative here.

gets rid of warnings about int/size_t combinations
This commit is contained in:
Klas Lindfors
2014-11-10 10:08:12 +01:00
parent c14f53dfad
commit cd4fdef2f7
+1 -1
View File
@@ -442,7 +442,7 @@ static bool import_cert(ykpiv_state *state, enum enum_key_format cert_format,
*certptr++ = 0x70; *certptr++ = 0x70;
certptr += set_length(certptr, cert_len); certptr += set_length(certptr, cert_len);
if (compress) { if (compress) {
if (fread(certptr, 1, cert_len, input_file) != cert_len) { if (fread(certptr, 1, (size_t)cert_len, input_file) != (size_t)cert_len) {
fprintf(stderr, "Failed to read compressed certificate\n"); fprintf(stderr, "Failed to read compressed certificate\n");
goto import_cert_out; goto import_cert_out;
} }