diff --git a/devicemodel/core/sw_load_common.c b/devicemodel/core/sw_load_common.c index c820f2b3c..0a2a5d7b8 100644 --- a/devicemodel/core/sw_load_common.c +++ b/devicemodel/core/sw_load_common.c @@ -36,7 +36,7 @@ #include "pci_core.h" int with_bootargs; -static char bootargs[STR_LEN]; +static char bootargs[BOOT_ARG_LEN]; /* * Default e820 mem map: @@ -106,9 +106,9 @@ const struct e820_entry e820_default_entries[NUM_E820_ENTRIES] = { int acrn_parse_bootargs(char *arg) { - size_t len = strnlen(arg, STR_LEN); + size_t len = strnlen(arg, BOOT_ARG_LEN); - if (len < STR_LEN) { + if (len < BOOT_ARG_LEN) { strncpy(bootargs, arg, len + 1); with_bootargs = 1; printf("SW_LOAD: get bootargs %s\n", bootargs); diff --git a/devicemodel/include/sw_load.h b/devicemodel/include/sw_load.h index be4b817f8..a19f4bc91 100644 --- a/devicemodel/include/sw_load.h +++ b/devicemodel/include/sw_load.h @@ -29,6 +29,7 @@ #define _CORE_SW_LOAD_ #define STR_LEN 1024 +#define BOOT_ARG_LEN 2048 /* E820 memory types */ #define E820_TYPE_RAM 1 /* EFI 1, 2, 3, 4, 5, 6, 7 */