mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix Out of Bounds Write in sldns_b64_pton(),
fixed by check in sldns_str2wire_int16_data_buf(), reported by X41 D-Sec.
This commit is contained in:
parent
3f3cadd416
commit
c99438c6a1
2 changed files with 5 additions and 0 deletions
|
|
@ -12,6 +12,9 @@
|
||||||
reported by X41 D-Sec.
|
reported by X41 D-Sec.
|
||||||
- Fix Out of Bounds Write in sldns_str2wire_str_buf(),
|
- Fix Out of Bounds Write in sldns_str2wire_str_buf(),
|
||||||
reported by X41 D-Sec.
|
reported by X41 D-Sec.
|
||||||
|
- Fix Out of Bounds Write in sldns_b64_pton(),
|
||||||
|
fixed by check in sldns_str2wire_int16_data_buf(),
|
||||||
|
reported by X41 D-Sec.
|
||||||
|
|
||||||
2 December 2019: Wouter
|
2 December 2019: Wouter
|
||||||
- Merge pull request #122 from he32: In tcp_callback_writer(),
|
- Merge pull request #122 from he32: In tcp_callback_writer(),
|
||||||
|
|
|
||||||
|
|
@ -2104,6 +2104,8 @@ int sldns_str2wire_int16_data_buf(const char* str, uint8_t* rd, size_t* len)
|
||||||
char* s;
|
char* s;
|
||||||
int n;
|
int n;
|
||||||
n = strtol(str, &s, 10);
|
n = strtol(str, &s, 10);
|
||||||
|
if(n < 0) /* negative number not allowed */
|
||||||
|
return LDNS_WIREPARSE_ERR_SYNTAX;
|
||||||
if(*len < ((size_t)n)+2)
|
if(*len < ((size_t)n)+2)
|
||||||
return LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL;
|
return LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL;
|
||||||
if(n > 65535)
|
if(n > 65535)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue