mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 14:47:09 +00:00
- Fix Out of Bounds Read in sldns_str2wire_dname(),
reported by X41 D-Sec.
This commit is contained in:
parent
a3545867fc
commit
51c23b0209
@ -13,6 +13,8 @@
|
||||
reported by X41 D-Sec.
|
||||
- Fix Integer Overflow to Buffer Overflow in
|
||||
sldns_str2wire_dname_buf_origin(), reported by X41 D-Sec.
|
||||
- Fix Out of Bounds Read in sldns_str2wire_dname(),
|
||||
reported by X41 D-Sec.
|
||||
|
||||
18 November 2019: Wouter
|
||||
- In unbound-host use separate variable for get_option to please
|
||||
|
@ -172,7 +172,9 @@ uint8_t* sldns_str2wire_dname(const char* str, size_t* len)
|
||||
uint8_t dname[LDNS_MAX_DOMAINLEN+1];
|
||||
*len = sizeof(dname);
|
||||
if(sldns_str2wire_dname_buf(str, dname, len) == 0) {
|
||||
uint8_t* r = (uint8_t*)malloc(*len);
|
||||
uint8_t* r;
|
||||
if(*len > sizeof(dname)) return NULL;
|
||||
r = (uint8_t*)malloc(*len);
|
||||
if(r) return memcpy(r, dname, *len);
|
||||
}
|
||||
*len = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user