projects
/
platform
/
upstream
/
erofs-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18cee8a
)
erofs-utils: lib: tar: Initialize the variable to avoid using garbage value
author
Sandeep Dhavale
<dhavale@google.com>
Wed, 13 Sep 2023 22:11:04 +0000
(15:11 -0700)
committer
Gao Xiang
<hsiangkao@linux.alibaba.com>
Thu, 14 Sep 2023 02:53:38 +0000
(10:53 +0800)
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>
lib/tar.c
patch
|
blob
|
history
diff --git
a/lib/tar.c
b/lib/tar.c
index b58bfd5e55fa9a21295de0d0acc38c9124e97b24..c4c89ecf382a883a49bb8819919771c4933b6294 100644
(file)
--- a/
lib/tar.c
+++ b/
lib/tar.c
@@
-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;