ndr: Init variables of GUID_from_data_blob()
authorAndreas Schneider <asn@samba.org>
Wed, 26 Sep 2018 12:30:32 +0000 (14:30 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 19 Oct 2018 21:11:26 +0000 (23:11 +0200)
Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
librpc/ndr/uuid.c

index 53540c7ddc8ba4fef2e0a5ba783a6036b21fb1df..6c5082190ca236d44003d7e84ea32ba21280da16 100644 (file)
@@ -59,11 +59,12 @@ _PUBLIC_ NTSTATUS GUID_from_ndr_blob(const DATA_BLOB *b, struct GUID *guid)
 _PUBLIC_ NTSTATUS GUID_from_data_blob(const DATA_BLOB *s, struct GUID *guid)
 {
        NTSTATUS status = NT_STATUS_INVALID_PARAMETER;
-       uint32_t time_low;
-       uint32_t time_mid, time_hi_and_version;
-       uint32_t clock_seq[2];
-       uint32_t node[6];
-       uint8_t buf16[16];
+       uint32_t time_low = 0;
+       uint32_t time_mid = 0;
+       uint32_t time_hi_and_version = 0;
+       uint32_t clock_seq[2] = {0};
+       uint32_t node[6] = {0};
+       uint8_t buf16[16] = {0};
 
        DATA_BLOB blob16 = data_blob_const(buf16, sizeof(buf16));
        int i;