mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 18:27:18 +00:00
dm: use strncpy to replace strcpy
Tracked-On: #2133 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -318,7 +318,7 @@ acrn_sw_load_bzimage(struct vmctx *ctx)
|
||||
ctx->bsp_regs.vcpu_id = 0;
|
||||
|
||||
if (with_bootargs) {
|
||||
strcpy(ctx->baseaddr + BOOTARGS_LOAD_OFF(ctx), get_bootargs());
|
||||
strncpy(ctx->baseaddr + BOOTARGS_LOAD_OFF(ctx), get_bootargs(), STR_LEN);
|
||||
printf("SW_LOAD: bootargs copied to guest 0x%lx\n",
|
||||
BOOTARGS_LOAD_OFF(ctx));
|
||||
}
|
||||
|
Reference in New Issue
Block a user