mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-22 02:28:49 +08:00
cpukit/libpci: fix potential buffer overflow in pci_cfg_print_code.c
See also CID 1399721 Closes #4442
This commit is contained in:
committed by
Vijay Kumar Banerjee
parent
342fe19842
commit
e2011dca26
@@ -65,8 +65,8 @@ static void pci_cfg_print_device(struct pci_dev *dev, char *prefix)
|
||||
char name[32];
|
||||
char buf[8];
|
||||
printf("%s.resources = {\n", prefix);
|
||||
strcpy(buf, prefix);
|
||||
strcat(buf, "\t");
|
||||
strlcpy(buf, prefix, sizeof(buf));
|
||||
strlcat(buf, "\t", sizeof(buf));
|
||||
pci_cfg_print_resources(dev->resources, buf);
|
||||
printf("%s},\n", prefix);
|
||||
if (dev->next == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user