[CRIU] [PATCH] mnt: Devpts options get corrupted on dump

Filipe Brandenburger filbranden at google.com
Fri May 30 06:52:32 PDT 2014


Hi,

On Fri, May 30, 2014 at 4:30 AM, Pavel Emelyanov <xemul at parallels.com> wrote:
> +       memcpy(buf + len, opt, olen);

You might be missing the NUL byte ending the string. I don't think
realloc is supposed to guarantee to always give you a zeroed range.

memcpy(buf + len, opt, olen + 1) might fix that. So might buf[len +
olen] = '\0' (or straight 0) after the memcpy.

Cheers,
Filipe


More information about the CRIU mailing list