lib:mscat: Fix may be used uninitialized warnings
authorAndreas Schneider <asn@samba.org>
Fri, 18 Jan 2019 12:11:38 +0000 (13:11 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Sat, 19 Jan 2019 11:24:18 +0000 (12:24 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/mscat/mscat_pkcs7.c

index 5594423..d606a86 100644 (file)
@@ -121,7 +121,9 @@ int mscat_pkcs7_import_catfile(struct mscat_pkcs7 *mp7,
        gnutls_datum_t mscat_data = {
                .size = 0,
        };
-       DATA_BLOB blob;
+       DATA_BLOB blob = {
+               .length = 0,
+       };
        int rc;
 
        tmp_ctx = talloc_new(mp7);
@@ -164,7 +166,9 @@ int mscat_pkcs7_verify(struct mscat_pkcs7 *mp7,
        TALLOC_CTX *tmp_ctx = NULL;
        gnutls_x509_trust_list_t tl = NULL;
        gnutls_datum_t ca_data;
-       DATA_BLOB blob;
+       DATA_BLOB blob = {
+               .length = 0,
+       };
        uint32_t flags = 0;
        const char *oid;
        int count;