diff options
author | Sergii Dmytruk <sergii.dmytruk@3mdeb.com> | 2022-03-13 18:23:17 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-03-22 20:45:26 +0000 |
commit | 206328d57bd97e652fa312b07ff3a2a10f1cb7da (patch) | |
tree | 4e791f9cfceee66bc038e54e519adf8d80a0c56d /src/acpi/acpigen_usb.c | |
parent | 9ad63e44609f39b59a91b3a4fd5c1034e0fe0bec (diff) |
lib/device_tree.c: zero-initialize new DT nodes
Prevents bad things from happening later when these new nodes are used.
This issue is hard to observe because:
1. Heap is zero-initialized, so you need to use allocated memory
filling it with non-zero values, free, allocate it again, use
uninitialized.
2. Most of allocated memory is not freed.
3. Implementation of free() does something only for one last malloc'ed
block, making most of freed memory unavailable for future
allocation.
Change-Id: I38a7ec1949d80f7a2564fac380ce94de6056a0c7
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62928
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/acpi/acpigen_usb.c')
0 files changed, 0 insertions, 0 deletions