mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: util/cbfstool: Add NULL-ptr check
BUG=None BRANCH=None TEST=None Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1323507 Reviewed-on: https://review.coreboot.org/17858 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Change-Id: I8b5caf5423135fe683a24db6700b895a2685cb98 Reviewed-on: https://chromium-review.googlesource.com/420519 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
parent
0e4272c74e
commit
06b470b633
1 changed files with 2 additions and 1 deletions
|
@ -175,6 +175,7 @@ static int cbfs_file_get_compression_info(struct cbfs_file *entry,
|
|||
uint32_t *decompressed_size)
|
||||
{
|
||||
unsigned int compression = CBFS_COMPRESS_NONE;
|
||||
if (decompressed_size)
|
||||
*decompressed_size = ntohl(entry->len);
|
||||
for (struct cbfs_file_attribute *attr = cbfs_file_first_attr(entry);
|
||||
attr != NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue