Commit d13be2f8 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

seize: fix memory corruption

277                     }
>>> >>>     CID 164718:  Memory - corruptions  (OVERRUN)
>>> >>>     Overrunning array "stackbuf" of 2048 bytes at byte offset 2048 using index "ret" (which evaluates to 2048).
278                     stackbuf[ret] = '\0';
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 3de0f49a
......@@ -270,7 +270,7 @@ static int log_unfrozen_stacks(char *root)
return -1;
}
ret = read(stack, stackbuf, sizeof(stackbuf));
ret = read(stack, stackbuf, sizeof(stackbuf) - 1);
close(stack);
if (ret < 0) {
pr_perror("couldn't read %d's stack", pid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment