diff options
author | Jacob Garber <jgarber1@ualberta.ca> | 2019-07-16 15:48:28 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-07-19 17:17:05 +0000 |
commit | 0db6e7569da8aff8d868afd65027c075b4710fa4 (patch) | |
tree | 9afb7bc85a3c3591f9ac2357d8a6afd10245e724 /src/mainboard/apple/macbookair4_2 | |
parent | d552acac1dd5c74661c94d2ca0d75f1a3a109f5b (diff) |
mb/getac/p470: Null-terminate ec_id string buffer
The EC ID of the ECDT needs to be null-terminated (see ACPI specification,
section 5.2.15), which currently isn't being done due to an off-by-one
error. strncpy() is bug-prone exactly because of issues like this, so just
skip it entirely and use memcpy() instead.
Change-Id: I0b62e1f32177c9768fa978053ab26bca93d7248d
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 1402104
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34374
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'src/mainboard/apple/macbookair4_2')
0 files changed, 0 insertions, 0 deletions