diff options
author | edisonhello <edisonhello@google.com> | 2021-08-06 18:06:15 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-10 09:28:35 +0000 |
commit | 302794156d6689d97eba7d7f6907498858d6b0ef (patch) | |
tree | 22803d7496f4bab3ca061c3ba6ff99da0f0c427b /firmware/2lib/2misc.c | |
parent | 3a1870160e12ccb0250fa2b56b2867aa9c02cfe8 (diff) | |
download | vboot-302794156d6689d97eba7d7f6907498858d6b0ef.tar.gz |
vboot/ui: Check allocated pointer before using the pointerstabilize-14149.B
Change the order of checking whether the allocated pointer is null
and memset the allocated pointer. Prevent using a null pointer, which
may cause segmentation fault.
BUG=none
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 \
make -j32 test_setup && make -j32 runtests;
TEST=emerge-asurada depthcharge
BRANCH=none
Signed-off-by: edisonhello <edisonhello@google.com>
Change-Id: I5fc91b5157b32b6b7263d580998eceb6efe9a63a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3077962
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'firmware/2lib/2misc.c')
0 files changed, 0 insertions, 0 deletions