aboutsummaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfs_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/cbfs_image.c')
-rw-r--r--util/cbfstool/cbfs_image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index e1a0e8c858..ee229b365d 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)) {