From d0bf018e951d6b7382053387d53f415f64be2dcf Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 31 May 2023 13:35:58 +0200 Subject: [PATCH] [test] fix uninitialized variables in test case --- libfreerdp/core/test/TestFuzzCryptoCertificateDataSetPEM.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libfreerdp/core/test/TestFuzzCryptoCertificateDataSetPEM.c b/libfreerdp/core/test/TestFuzzCryptoCertificateDataSetPEM.c index bd67d6347..203271564 100644 --- a/libfreerdp/core/test/TestFuzzCryptoCertificateDataSetPEM.c +++ b/libfreerdp/core/test/TestFuzzCryptoCertificateDataSetPEM.c @@ -4,13 +4,12 @@ int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) { + rdpCertificateData* data = NULL; char* pem = calloc(Size + 1, sizeof(char)); if (pem == NULL) goto cleanup; memcpy(pem, Data, Size); - pem[Size] = '\0'; - rdpCertificateData* data = NULL; data = freerdp_certificate_data_new_from_pem("somehost", 1234, pem, Size); if (!data) goto cleanup;