hw/r2d: add comment: this strncpy use is ok
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
00ea188125
commit
9310b9be14
2
hw/r2d.c
2
hw/r2d.c
@ -332,6 +332,8 @@ static void r2d_init(ram_addr_t ram_size,
|
||||
}
|
||||
|
||||
if (kernel_cmdline) {
|
||||
/* I see no evidence that this .kernel_cmdline buffer requires
|
||||
NUL-termination, so using strncpy should be ok. */
|
||||
strncpy(boot_params.kernel_cmdline, kernel_cmdline,
|
||||
sizeof(boot_params.kernel_cmdline));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user