buffer overflow fix

in MULTIPLE_EXTERNAL_IP code which is not used normally...
This commit is contained in:
Thomas Bernard 2015-12-31 00:41:24 +01:00
parent 58b130116b
commit e076899a37
1 changed files with 1 additions and 1 deletions

View File

@ -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");