mg_dns_parse_name() recursion protection

This commit is contained in:
cpq committed 2020-12-11 14:02:52 +00:00
1 parent 30d4a1ad0f
commit 85c5577955
3 files changed
+9 -4

No files matched your search

+3
View File
@@ -864,7 +864,10 @@ static void test_str(void) {
static void test_dns(void) {
struct mg_dns_message dm;
char *data = mg_file_read("data.txt");
ASSERT(mg_dns_parse(NULL, 0, &dm) == 0);
ASSERT(mg_dns_parse((uint8_t *) data, strlen(data), &dm) == 0);
free(data);
}
static void test_util(void) {