nat: Fix initial buffer size parameter for getline

According to man, lineptr must be set to null AND n to 0.

Change-Id: I36683884106b97ef697264716de13813c00da9bc
This commit is contained in:
Pau Espin 2017-04-10 15:43:19 +02:00
parent dc9de23523
commit 7636c0833b
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ struct nat_rewrite *nat_rewrite_parse(void *ctx, const char *filename)
{
FILE *file;
char *line = NULL;
size_t n = 2342;
size_t n = 0;
struct nat_rewrite *res;
file = fopen(filename, "r");