diff options
Diffstat (limited to 'usr.sbin/pkg_install/add/main.c')
-rw-r--r-- | usr.sbin/pkg_install/add/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/add/main.c b/usr.sbin/pkg_install/add/main.c index 61caab1..0750a76 100644 --- a/usr.sbin/pkg_install/add/main.c +++ b/usr.sbin/pkg_install/add/main.c @@ -178,7 +178,7 @@ main(int argc, char **argv) argv += optind; if (AddMode != SLAVE) { - pkgs = (char **)malloc(argc * sizeof(char *)); + pkgs = (char **)malloc((argc+1) * sizeof(char *)); for (ch = 0; ch <= argc; pkgs[ch++] = NULL) ; /* Get all the remaining package names, if any */ |