diff options
author | Sandeep Dhavale <dhavale@google.com> | 2023-09-13 15:11:04 -0700 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-09-14 10:53:38 +0800 |
commit | fdded5b7a810f53b2ea43f0cf3de54802184f0d9 (patch) | |
tree | bdfa10c3359618e4edb447cd4300295db80cedd4 | |
parent | 18cee8aa48ac15902a8e9d693e6b8afd8baf22f1 (diff) | |
download | erofs-utils-fdded5b7a810f53b2ea43f0cf3de54802184f0d9.tar.gz |
erofs-utils: lib: tar: Initialize the variable to avoid using garbage value
The value in variable 'e' is checked without initializing and can
wrongly signify end of tar 2 empty blocks.
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
Link: https://lore.kernel.org/r/20230913221104.429825-8-dhavale@google.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
-rw-r--r-- | lib/tar.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -549,7 +549,7 @@ int tarerofs_parse_tar(struct erofs_inode *root, struct erofs_tarfile *tar) char path[PATH_MAX]; struct erofs_pax_header eh = tar->global; struct erofs_sb_info *sbi = root->sbi; - bool e, whout, opq; + bool whout, opq, e = false; struct stat st; erofs_off_t tar_offset, data_offset; |