diff --git a/src/lib-popt/popt.c b/src/lib-popt/popt.c index d2fe34f7..a23ae8aa 100644 --- a/src/lib-popt/popt.c +++ b/src/lib-popt/popt.c @@ -453,7 +453,7 @@ int poptGetNextOpt(poptContext con) { if (opt->arg && (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE && (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_VAL) con->finalArgv[con->finalArgvCount++] = - strcpy(malloc(strlen(con->os->nextArg)), con->os->nextArg); + strcpy(malloc(strlen(con->os->nextArg)+1), con->os->nextArg); } if (dup) g_free(dup);