- Fix memory leak when message parse fails partway through copy.

- remove unused udpsize assignment in message encode.


git-svn-id: file:///svn/unbound/trunk@4904 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2018-09-13 12:30:44 +00:00
parent 2e9d09b961
commit 898d4c8dd9
3 changed files with 8 additions and 4 deletions
+2
View File
@@ -18,6 +18,8 @@
- in authzone check that node exists before adding rrset.
- in unbound-anchor, use readwrite memory BIO.
- assertion in autotrust that packed rrset is formed correctly.
- Fix memory leak when message parse fails partway through copy.
- remove unused udpsize assignment in message encode.
11 September 2018: Wouter
- Fixed unused return value warnings in contrib/fastrpz.patch for
-2
View File
@@ -647,8 +647,6 @@ reply_info_encode(struct query_info* qinfo, struct reply_info* rep,
sldns_buffer_clear(buffer);
if(udpsize < sldns_buffer_limit(buffer))
sldns_buffer_set_limit(buffer, udpsize);
else if(sldns_buffer_limit(buffer) < udpsize)
udpsize = sldns_buffer_limit(buffer);
if(sldns_buffer_remaining(buffer) < LDNS_HEADER_SIZE)
return 0;
+6 -2
View File
@@ -441,10 +441,14 @@ parse_create_msg(sldns_buffer* pkt, struct msg_parse* msg,
return 0;
if(!parse_create_repinfo(msg, rep, region))
return 0;
if(!reply_info_alloc_rrset_keys(*rep, alloc, region))
if(!reply_info_alloc_rrset_keys(*rep, alloc, region)) {
if(!region) reply_info_parsedelete(*rep, alloc);
return 0;
if(!parse_copy_decompress(pkt, msg, *rep, region))
}
if(!parse_copy_decompress(pkt, msg, *rep, region)) {
if(!region) reply_info_parsedelete(*rep, alloc);
return 0;
}
return 1;
}