From: Jelte Jansen Date: Wed, 4 Feb 2009 08:17:40 +0000 (+0000) Subject: initialize *bin var to null X-Git-Tag: release-1.5.0~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ede0ee2cc8f1fef372113c76ccc7b2239c3eb107;p=thirdparty%2Fldns.git initialize *bin var to null --- diff --git a/keys.c b/keys.c index adabfb55..9c9c7009 100644 --- 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 */