mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 01:54:44 +00:00
Enable FORTIFY and FORMAT SECURITY compile flags
1. Enable below 2 defenses in Makefile "-O2 -D_FORTIFY_SOURCE=2" "-Wformat -Wformat-security" 2. Update related source code impacted by above 2 flags Change-Id: Ib42214848f030b4cf508cd7c52a7e3cc809435d9 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -421,11 +421,17 @@ pci_lpc_deinit(struct vmctx *ctx, struct pci_vdev *pi, char *opts)
|
||||
char *
|
||||
lpc_pirq_name(int pin)
|
||||
{
|
||||
char *name;
|
||||
char *name = NULL;
|
||||
|
||||
if (lpc_bridge == NULL)
|
||||
return NULL;
|
||||
asprintf(&name, "\\_SB.PCI0.ISA.LNK%c,", 'A' + pin - 1);
|
||||
|
||||
if (asprintf(&name, "\\_SB.PCI0.ISA.LNK%c,", 'A' + pin - 1) < 0) {
|
||||
if (name != NULL)
|
||||
free(name);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user