ubi-utils: ubimkvol: Initialize req to zero to make sure no flags are set by default
PATCH 1/1 ubi-utils: ubimkvol: Initialize req to zero to make sure no flags are set by default
The program expects req.flags to be zero-initialized, but it's not the case. Let's explicitly initialize req to zero at declaration time.
Fixes 7b4a65a27d26 ("ubi-utils: ubimkvol: add support for skipping CRC check of a static volume when opening")
Signed-off-by Boris Brezillon <[email protected]>
--- ubi-utils/ubimkvol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ubi-utils/ubimkvol.c +1 -1
@@ -221,7 +221,7 @@ int main(int argc, char * const argv[])libubi_t libubi;struct ubi_dev_info dev_info;struct ubi_vol_info vol_info; -struct ubi_mkvol_request req; +struct ubi_mkvol_request req = { }; err =parse_opt (argc, argv);if (err)
Signature · 1 line
2.14.1
Hi Boris,
Quoted 5 lines · Boris Brezillon
The program expects req.flags to be zero-initialized, but it's not the case. Let's explicitly initialize req to zero at declaration time.
Fixes 7b4a65a27d26 ("ubi-utils: ubimkvol: add support for skipping CRC check of a static volume when opening")Signed-off-by Boris Brezillon <[email protected]>
Reviewed-by Quentin Schulz <[email protected]>
Quoted 20 lines
--- ubi-utils/ubimkvol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)ubi-utils/ubimkvol.c +1
-1@@ -221,7 +221,7 @@ int main(int argc, char * const argv[])libubi_t libubi;struct ubi_dev_info dev_info;struct ubi_vol_info vol_info; -struct ubi_mkvol_request req; +struct ubi_mkvol_request req = { }; err =parse_opt (argc, argv);if (err)Signature · 1 line
2.14.1
David Oberhollenzer
AppliedApplied to mtd-utils.git master.
Thanks,
David