Fix stack overflow in write_record_aaaa
This commit is contained in:
parent
63ff7e40c9
commit
b1cf356ff2
1 changed files with 1 additions and 1 deletions
2
dns.cpp
2
dns.cpp
|
@ -180,7 +180,7 @@ int static write_record_aaaa(unsigned char** outpos, const unsigned char *outend
|
|||
int error = 0;
|
||||
int ret = write_record(outpos, outend, name, offset, TYPE_AAAA, cls, ttl);
|
||||
if (ret) return ret;
|
||||
if (outend - *outpos < 6) {
|
||||
if (outend - *outpos < 18) {
|
||||
error = -5;
|
||||
} else {
|
||||
// rdlength
|
||||
|
|
Loading…
Reference in a new issue