fixed buffer overflow in handle_null_request()

This commit is contained in:
WGH 2016-08-03 01:12:24 +03:00
parent 5dbe640ec5
commit 4c2f9bf4b7

View File

@ -1854,7 +1854,7 @@ handle_null_request(int dns_fd, struct query *q, int domain_len)
{ {
char cmd, userchar; char cmd, userchar;
int userid = -1; int userid = -1;
uint8_t in[QUERY_NAME_SIZE]; uint8_t in[QUERY_NAME_SIZE + 1];
/* Everything here needs at least 5 chars in the name: /* Everything here needs at least 5 chars in the name:
* cmd, userid and more data or at least 3 bytes CMC */ * cmd, userid and more data or at least 3 bytes CMC */