diff options
author | Jon Murphy <jpmurphy@google.com> | 2022-10-04 14:30:55 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-05 07:13:23 +0000 |
commit | ff8bb2d968b414d78b56e63499f33a0bfbedca02 (patch) | |
tree | a7b5f7519868caa1f42aa2be22dbdcfa824d0592 /futility | |
parent | 6a33a0fca3e4f5cd9c3b3fd4ac0b5b8c7ffc018e (diff) | |
download | vboot-ff8bb2d968b414d78b56e63499f33a0bfbedca02.tar.gz |
futility: Address double freestabilize-15167.B
The body_sig pointer is being freed twice. This can lead to
indeterminate behavior and could corrupt memory. Remove superfluous
free to avoid memory corruption.
BUG=b:250952592
TEST=NA
BRANCH=None
Change-Id: Ie4c11e940653550e24829f253d05be08d74620f6
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3935032
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'futility')
-rw-r--r-- | futility/cmd_sign.c | 1 | ||||
-rw-r--r-- | futility/file_type_bios.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/futility/cmd_sign.c b/futility/cmd_sign.c index 8ffd7034..383d39d7 100644 --- a/futility/cmd_sign.c +++ b/futility/cmd_sign.c @@ -292,7 +292,6 @@ int ft_sign_raw_firmware(const char *name, void *data) sign_option.flags); if (!preamble) { fprintf(stderr, "Error creating firmware preamble.\n"); - free(body_sig); goto done; } diff --git a/futility/file_type_bios.c b/futility/file_type_bios.c index ab20adb0..e900f271 100644 --- a/futility/file_type_bios.c +++ b/futility/file_type_bios.c @@ -261,7 +261,6 @@ static int write_new_preamble(struct bios_area_s *vblock, vblock->flags); if (!preamble) { ERROR("Error creating firmware preamble.\n"); - free(body_sig); goto end; } |