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

Pavel Emelyanov xemul at parallels.com
Fri May 30 07:25:20 PDT 2014


On 05/30/2014 05:52 PM, Filipe Brandenburger wrote:
> 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.

Ouch. I do. Yup, will fix that, thanks.

> 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
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
> 




More information about the CRIU mailing list