Fix heap buffer overflow in mako
This commit is contained in:
parent
a97d0df07e
commit
fd180e242d
|
@ -1711,7 +1711,7 @@ int main(int argc, char *argv[]) {
|
|||
shm->readycount = 0;
|
||||
|
||||
/* fork worker processes */
|
||||
worker_pids = (pid_t *)calloc(sizeof(pid_t), args.num_processes);
|
||||
worker_pids = (pid_t*)calloc(sizeof(pid_t), args.num_processes + 1);
|
||||
if (!worker_pids) {
|
||||
fprintf(stderr, "ERROR: cannot allocate worker_pids (%d processes)\n",
|
||||
args.num_processes);
|
||||
|
|
Loading…
Reference in New Issue