From: Wouter Wijngaards Date: Fri, 29 Apr 2016 15:02:00 +0000 (+0000) Subject: - Fix sldns with static checking fixes copied from getdns. X-Git-Tag: release-1.5.9rc1~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac506c5a208b1911bf18f95d96f63164f54a0ca0;p=thirdparty%2Funbound.git - Fix sldns with static checking fixes copied from getdns. git-svn-id: file:///svn/unbound/trunk@3716 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index cb29d1c17..e349e84a0 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +29 April 2016: Wouter + - Fix sldns with static checking fixes copied from getdns. + 28 April 2016: Wouter - Fix #759: 0x20 capsforid no longer checks type PTR, for compatibility with cisco dns guard. This lowers false positives. diff --git a/sldns/keyraw.c b/sldns/keyraw.c index 59e8000f5..8d28bf40a 100644 --- a/sldns/keyraw.c +++ b/sldns/keyraw.c @@ -206,7 +206,6 @@ sldns_key_buf2dsa_raw(unsigned char* key, size_t len) offset += length; Y = BN_bin2bn(key+offset, (int)length, NULL); - offset += length; /* create the key and set its properties */ if(!Q || !P || !G || !Y || !(dsa = DSA_new())) { diff --git a/sldns/parseutil.c b/sldns/parseutil.c index 2a2ebbb08..32717616a 100644 --- a/sldns/parseutil.c +++ b/sldns/parseutil.c @@ -637,7 +637,7 @@ int sldns_b64_ntop(uint8_t const *src, size_t srclength, target[o+1] = b64[ ((src[i]&0x03)<<4) | (src[i+1]>>4) ]; target[o+2] = b64[ ((src[i+1]&0x0f)<<2) ]; target[o+3] = pad64; - i += 2; + /* i += 2; */ o += 4; break; case 1: @@ -646,7 +646,7 @@ int sldns_b64_ntop(uint8_t const *src, size_t srclength, target[o+1] = b64[ ((src[i]&0x03)<<4) ]; target[o+2] = pad64; target[o+3] = pad64; - i += 1; + /* i += 1; */ o += 4; break; case 0: diff --git a/sldns/str2wire.c b/sldns/str2wire.c index c54108332..e624e269e 100644 --- a/sldns/str2wire.c +++ b/sldns/str2wire.c @@ -892,10 +892,10 @@ int sldns_fp2wire_rr_buf(FILE* in, uint8_t* rr, size_t* len, size_t* dname_len, parse_state?parse_state->default_ttl:0, (parse_state&&parse_state->origin_len)? parse_state->origin:NULL, - parse_state->origin_len, + parse_state?parse_state->origin_len:0, (parse_state&&parse_state->prev_rr_len)? parse_state->prev_rr:NULL, - parse_state->prev_rr_len); + parse_state?parse_state->prev_rr_len:0); } return LDNS_WIREPARSE_ERR_OK; }