]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
libdane: bogus and secure values are always initialized in dane_query_to_raw_tlsa
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 22 Jul 2014 16:22:40 +0000 (18:22 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 22 Jul 2014 16:22:40 +0000 (18:22 +0200)
libdane/dane.c

index 29721697e46f30d13d1fdf5b43395e65a2b11cc9..ad9af867e211b65202b01e7ac7cc3614a3dbc7ec 100644 (file)
@@ -164,16 +164,22 @@ dane_query_to_raw_tlsa(dane_query_t q, unsigned int *data_entries,
        unsigned int idx;
 
        *data_entries = 0;
+       if (bogus)
+               *bogus = 0;
+       if (secure)
+               *secure = 0;
        *dane_data = NULL;
        *dane_data_len = NULL;
 
        switch (q->status) {
        case DANE_QUERY_DNSSEC_VERIFIED:
-               *secure = 1;
+               if (secure)
+                       *secure = 1;
                break;
 
        case DANE_QUERY_BOGUS:
-               *bogus = 1;
+               if (bogus)
+                       *bogus = 1;
                break;
 
        default: