]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
initialize *bin var to null
authorJelte Jansen <jelte@NLnetLabs.nl>
Wed, 4 Feb 2009 08:17:40 +0000 (08:17 +0000)
committerJelte Jansen <jelte@NLnetLabs.nl>
Wed, 4 Feb 2009 08:17:40 +0000 (08:17 +0000)
keys.c

diff --git a/keys.c b/keys.c
index adabfb55f42a4999f04ecb25624759944beb224a..9c9c7009818eb5ca7342865d726b128513c5170b 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -957,7 +957,7 @@ ldns_key2rr(const ldns_key *k)
         */
        ldns_rr *pubkey;
        ldns_rdf *keybin;
-       unsigned char *bin;
+       unsigned char *bin = NULL;
        uint16_t size = 0;
        RSA *rsa = NULL;
        DSA *dsa = NULL;
@@ -1059,6 +1059,7 @@ ldns_key2rr(const ldns_key *k)
                                         ldns_key_algorithm(k)));
                        size = ldns_key_hmac_size(k);
                        memcpy(bin, ldns_key_hmac_key(k), size);
+                       internal_data = 1;
                        break;
        }
        /* fourth the key bin material */