Enlarged buffer
This commit is contained in:
+3
-2
@@ -2728,7 +2728,7 @@ static ndpi_patricia_node_t* add_to_ptree(ndpi_patricia_tree_t *tree, int family
|
|||||||
int ndpi_load_ptree_file(ndpi_ptree_t *ptree,
|
int ndpi_load_ptree_file(ndpi_ptree_t *ptree,
|
||||||
const char *path,
|
const char *path,
|
||||||
u_int16_t protocol_id) {
|
u_int16_t protocol_id) {
|
||||||
char buffer[128], *line, *addr, *cidr, *saveptr;
|
char buffer[1024], *line, *addr, *cidr, *saveptr;
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
int len;
|
int len;
|
||||||
u_int num_loaded = 0;
|
u_int num_loaded = 0;
|
||||||
@@ -2767,7 +2767,8 @@ int ndpi_load_ptree_file(ndpi_ptree_t *ptree,
|
|||||||
struct in_addr addr4;
|
struct in_addr addr4;
|
||||||
|
|
||||||
addr4.s_addr = inet_addr(addr);
|
addr4.s_addr = inet_addr(addr);
|
||||||
|
|
||||||
|
/* printf("+ %s/%d\n", addr, cidr ? atoi(cidr) : 32); */
|
||||||
node = add_to_ptree(ptree->v4, AF_INET, &addr4, cidr ? atoi(cidr) : 32 /* bits */);
|
node = add_to_ptree(ptree->v4, AF_INET, &addr4, cidr ? atoi(cidr) : 32 /* bits */);
|
||||||
} else {
|
} else {
|
||||||
struct in6_addr addr6;
|
struct in6_addr addr6;
|
||||||
|
|||||||
Reference in New Issue
Block a user