diff --git a/miniupnpd/miniupnpd.c b/miniupnpd/miniupnpd.c index 9124cea..8a84198 100644 --- a/miniupnpd/miniupnpd.c +++ b/miniupnpd/miniupnpd.c @@ -1503,7 +1503,7 @@ init(int argc, char * * argv, struct runtime_vars * v) #else /* #ifndef MULTIPLE_EXTERNAL_IP */ if(i+2 < argc) { - char *val=calloc((strlen(argv[i+1]) + strlen(argv[i+2]) + 1), sizeof(char)); + char *val = calloc((strlen(argv[i+1]) + strlen(argv[i+2]) + 2), sizeof(char)); if (val == NULL) { fprintf(stderr, "memory allocation error for listen address storage\n");