util/cbfstool: Add NULL-ptr check
Change-Id: I8b5caf5423135fe683a24db6700b895a2685cb98 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>
This commit is contained in:
parent
d03391aa68
commit
a2ce710df7
|
@ -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…
Reference in New Issue