mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
Fix previous rev.: don't step behind the end of memory we allocate
This commit is contained in:
parent
7404bf519f
commit
103fcbb3ba
1 changed files with 1 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue