mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 12:49:24 +00:00
dm: use snprintf to replace sprintf
Also remove the '\n' from the hugetlb's file name. 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:
@@ -636,7 +636,7 @@ smbios_type4_initializer(struct smbios_structure *template_entry,
|
||||
if (*p++ == '\0')
|
||||
nstrings++;
|
||||
}
|
||||
len = sprintf(*endaddr - 1, "CPU #%d", i) + 1;
|
||||
len = snprintf(*endaddr - 1, 16, "CPU #%d", i) + 1;
|
||||
*endaddr += len - 1;
|
||||
*(*endaddr) = '\0';
|
||||
(*endaddr)++;
|
||||
|
Reference in New Issue
Block a user