From: Willem Toorop Date: Fri, 25 May 2012 09:59:27 +0000 (+0000) Subject: bugfix #450: Base # bytes for P and G (T) on the guaranteed to be bigger P in ldns_ke... X-Git-Tag: release-1.6.14rc1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbcd757732f15aea78592d0dc612f53da4b3a0ca;p=thirdparty%2Fldns.git bugfix #450: Base # bytes for P and G (T) on the guaranteed to be bigger P in ldns_key_dsa2bin. Thanks Peter Koch and Patrick Fedick. --- diff --git a/Changelog b/Changelog index 9de8230a..f0a91e9b 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,7 @@ 1.6.14 + * bugfix #450: Base # bytes for P and G (T) on the guaranteed + to be bigger P in ldns_key_dsa2bin. + Thanks Peter Koch and Patrick Fedick. * bugfix #449: Deep free cloned rdf's in ldns_tsig_mac_new. Thanks Michael Sheldon. * bugfix #448: Copy nameserver value (in stead of reference) of the diff --git a/keys.c b/keys.c index 54f26681..38c38a31 100644 --- a/keys.c +++ b/keys.c @@ -1302,7 +1302,7 @@ ldns_key_dsa2bin(unsigned char *data, DSA *k, uint16_t *size) } /* See RFC2536 */ - *size = (uint16_t)BN_num_bytes(k->g); + *size = (uint16_t)BN_num_bytes(k->p); T = (*size - 64) / 8; memcpy(data, &T, 1);