Skip to contentSkip to conversation

erofs-utils: mkfs: fix uninitialized nblocks

PATCH In review Hongzhen Luo 2 participants 2 messages Aug 5, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 erofs-utils: mkfs: fix uninitialized nblocks

Coverity-id: 502376

---
 mkfs/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mkfs/main.c +1 -1
index f9ac4bd..3605e64 100644
@@ -1142,7 +1142,7 @@ int main(int argc, char **argv)
 	int err = 0;
 	struct erofs_buffer_head *sb_bh;
 	struct erofs_inode *root = NULL;
-	erofs_blk_t nblocks;
+	erofs_blk_t nblocks = 0;
 	struct timeval t;
 	FILE *packedfile = NULL;
 	FILE *blklst = NULL;
Signature · 1 line
2.43.5