Re: [PATCH 1/2] Ensure nul-termination of file names read from checkpoint images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux