- Based on #1257: check parse limit before t increment in sldns RR

string parse routine.


git-svn-id: file:///svn/unbound/trunk@4133 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2017-04-26 09:03:15 +00:00
parent 56bde1ceca
commit 619b808b31
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,7 @@
26 April 2017: Wouter
- Based on #1257: check parse limit before t increment in sldns RR
string parse routine.
24 April 2017: Wouter
- unbound-checkconf -o allows query of dnstap config variables.
Also unbound-control get_option. Also for dnscrypt.

View file

@ -120,6 +120,10 @@ sldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *l
if (line_nr) {
*line_nr = *line_nr + 1;
}
if (limit > 0 && (i >= limit || (size_t)(t-token) >= limit)) {
*t = '\0';
return -1;
}
*t++ = ' ';
prev_c = c;
continue;