aboutsummaryrefslogtreecommitdiffstats
path: root/hwaccess.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-05-25 13:03:24 +0200
committerEdward O'Callaghan <quasisec@chromium.org>2021-05-28 12:50:36 +0000
commitbe5af628bdc4df2fc85a2a753ff54616b7a8405c (patch)
treed1d790f4034d195f3ca208e68d309be6db41e754 /hwaccess.c
parent2ef2efa0fa6a920fe3dd8f067a6632798b214bcd (diff)
downloadflashrom-be5af628bdc4df2fc85a2a753ff54616b7a8405c.tar.gz
flashrom-be5af628bdc4df2fc85a2a753ff54616b7a8405c.tar.bz2
flashrom-be5af628bdc4df2fc85a2a753ff54616b7a8405c.zip
dummyflasher.c: Prevent use-after-free bug
The memory for the `status` string is aliased by the `endptr` pointer. Moreover, `errno` could have been modified by the call to `free()`. Therefore, only free the former when there are no more uses of either. Change-Id: I1b56834004fe18918213a7df0a09a8a7ecb56985 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/54909 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'hwaccess.c')
0 files changed, 0 insertions, 0 deletions