From 8afa27c936b95ddfdcfc353ecf6eba832c62ccc3 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 10 Mar 2020 08:50:55 +0100 Subject: [PATCH] Fixed broken NULL check. --- winpr/tools/makecert/makecert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winpr/tools/makecert/makecert.c b/winpr/tools/makecert/makecert.c index cbc0f1f30..2f2300524 100644 --- a/winpr/tools/makecert/makecert.c +++ b/winpr/tools/makecert/makecert.c @@ -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; } }