Fix previous rev.: don't step behind the end of memory we allocate
This commit is contained in:
parent
7404bf519f
commit
103fcbb3ba
@ -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 New Issue
Block a user