[coreboot-gerrit] Patch set updated for coreboot: util/cbfstool: Add NULL-ptr check
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Dec 15 14:46:00 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17858
-gerrit
commit dddd6d3be39bdc49325ad75fa29149a08e25470c
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Wed Dec 14 16:08:52 2016 +0100
util/cbfstool: Add NULL-ptr check
Change-Id: I8b5caf5423135fe683a24db6700b895a2685cb98
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Found-by: Coverity Scan #1323507
---
util/cbfstool/cbfs_image.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index e1a0e8c..ee229b3 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -175,7 +175,8 @@ static int cbfs_file_get_compression_info(struct cbfs_file *entry,
uint32_t *decompressed_size)
{
unsigned int compression = CBFS_COMPRESS_NONE;
- *decompressed_size = ntohl(entry->len);
+ if (decompressed_size)
+ *decompressed_size = ntohl(entry->len);
for (struct cbfs_file_attribute *attr = cbfs_file_first_attr(entry);
attr != NULL;
attr = cbfs_file_next_attr(entry, attr)) {
More information about the coreboot-gerrit
mailing list