diff options
author | Jeremy Compostella <jeremy.compostella@intel.com> | 2023-10-24 10:09:54 -0700 |
---|---|---|
committer | Matt DeVillier <matt.devillier@amd.corp-partner.google.com> | 2023-11-02 13:29:04 +0000 |
commit | eb93808fa53d95900ea42b42f8c943c282d99973 (patch) | |
tree | eaeb515e40c02e767b20227f214d0f8555c074c5 /src/soc/qualcomm | |
parent | 47b393a17d8c911601a5044bb41de3eb3215f458 (diff) |
commonlib/fsp_relocate: Fix potential NULL pointer dereference
Commit 1df1cf994aa9 ("commonlib/fsp_relocate: add PE32 section
support") introduced a potential NULL pointer dereference if there is
PE32 binary to relocate outside of the first firmware volume.
The `fih_offset' pointer was used as an output variable but now it is
also used as an input variable to pass the FSP information header to
the `pe_relocate()' function.
This commit resolves this potential NULL-pointer dereference by
passing the pointer systematically and without affecting the logic as
it is only set if it has not been set before.
Change-Id: I9fad90a60854d5f050aa044a5c0b3af91c99df4a
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78501
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/qualcomm')
0 files changed, 0 insertions, 0 deletions