mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
strlcat takes the size of the buffer, not the number of characters to concatenate. If the size of the device tree command line p is larger than the CONFIG_CMDLINE string data, then strcat(data, p, l) will hit a BUG_ON because strlen(data) > l. Replace the second strlcat with a strncpy plus a manual null termination. Also rearrange the code to reduce indent depth to make it more readable, and replace data with a char *cmdline to avoid extra casts. Signed-off-by: Colin Cross <ccross@android.com> |
||
|---|---|---|
| .. | ||
| address.c | ||
| base.c | ||
| device.c | ||
| fdt.c | ||
| irq.c | ||
| Kconfig | ||
| Makefile | ||
| of_i2c.c | ||
| of_mdio.c | ||
| of_mtd.c | ||
| of_net.c | ||
| of_pci_irq.c | ||
| of_pci.c | ||
| of_private.h | ||
| pdt.c | ||
| platform.c | ||
| selftest.c | ||