[CRIU] [PATCH cr] parasite: fix size of cmd

Cyrill Gorcunov gorcunov at openvz.org
Tue Oct 2 15:38:28 EDT 2012


On Tue, Oct 02, 2012 at 11:32:09PM +0400, Andrey Vagin wrote:
> cmd is declarated in parasite-head-x86-64.S
> __export_parasite_cmd:
>         .long 0
> 
> Its size is 8 bytes, so it should be int instead of long.

s/8/4/, typo ;)

> This patch fixes a bug in parasite execute,
> where a part of args are overwritten by cmd.
> 
> memcpy(ctl->addr_cmd, &cmd, sizeof(cmd));
> 
> Reported-by: Stanislav Kinsbursky <skinsbursky at parallels.com>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>


More information about the CRIU mailing list