diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2021-05-17 08:21:39 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-05-26 17:26:07 -0400 |
commit | 53ba2c21c2df142b37bb2f0d6850d79dcfd8976f (patch) | |
tree | adafa04657a5367bb73f686f5fdd0c3a90711180 /fs/squashfs | |
parent | f6c0d365d3e8ee8e4fd3ebe2ed957c2bca9d3328 (diff) | |
download | u-boot-53ba2c21c2df142b37bb2f0d6850d79dcfd8976f.tar.gz u-boot-53ba2c21c2df142b37bb2f0d6850d79dcfd8976f.tar.xz u-boot-53ba2c21c2df142b37bb2f0d6850d79dcfd8976f.zip |
fs/squashfs: zero out unused fields in fs_dirent
When reading directories the UEFI sub-system must supply file attributes
and timestamps. These fields will have to be added to struct fs_dirent.
SquashFS should not fill these fields with random data. Ensure that they
are zeroed out.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'fs/squashfs')
-rw-r--r-- | fs/squashfs/sqfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c index 29805c3c6f..997be2dcf4 100644 --- a/fs/squashfs/sqfs.c +++ b/fs/squashfs/sqfs.c @@ -876,7 +876,7 @@ int sqfs_opendir(const char *filename, struct fs_dir_stream **dirsp) char **token_list = NULL, *path = NULL; u32 *pos_list = NULL; - dirs = malloc(sizeof(*dirs)); + dirs = calloc(1, sizeof(*dirs)); if (!dirs) return -EINVAL; |