Fixed broken NULL check.

This commit is contained in:
Armin Novak 2020-03-10 08:50:55 +01:00
parent c58db76e4c
commit 8afa27c936

View File

@ -563,12 +563,12 @@ int makecert_context_output_certificate_file(MAKECERT_CONTEXT* context, char* pa
goto out_fail;
x509_str = makecert_read_str(bio, &offset);
if (x509_str)
if (!x509_str)
goto out_fail;
length = offset;
if (fwrite((void*)x509_str, length, 1, fp) != 1)
if (fwrite(x509_str, length, 1, fp) != 1)
goto out_fail;
}
}