mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-31 20:09:35 -05:00
Fix: buffer overflow bug
Found by static analyzer svace Static analyzer message: Array 'token' of size 65536 bytes passed to function 'rrinternal_parse_rdata' at str2wire.c:679 by passing as 2nd parameter to function 'rrinternal_parse_rdata' at str2wire.c:775, where it is accessed by unacceptable index. This may lead to buffer overflow. on-behalf-of: @ideco-team <github@ideco.ru>
This commit is contained in:
parent
2315fc9d9b
commit
0b362e3a4d
1 changed files with 1 additions and 1 deletions
|
|
@ -601,7 +601,7 @@ sldns_affix_token(sldns_buffer* strbuf, char* token, size_t* token_len,
|
|||
size_t addstrlen = 0;
|
||||
|
||||
/* add space */
|
||||
if(addlen < 1) return 0;
|
||||
if(addlen < 2) return 0;
|
||||
token[*token_strlen] = ' ';
|
||||
token[++(*token_strlen)] = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue