[Devel] Re: [PATCH 1/2] Ensure nul-termination of file names read from checkpoint images
Oren Laadan
orenl at librato.com
Fri Oct 23 17:29:53 PDT 2009
Oren Laadan wrote:
>
> Matt Helsley wrote:
>> Don't rely on the checkpoint image to properly terminate the filename.
>> Passing PATH_MAX + 1 won't work since it's a maximum -- not the number
>> of bytes to allocate. Allocate space for the string, copy an amount
>> according to the header length (limited to < PATH_MAX), and ensure that
>> it's nul-terminated.
>>
>> Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
>
> I dislike unneeded data copy.
> See ckpt_read_string() and ckpt_read_payload().
>
No need to resend -- I'll do the fix.
Oren.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list