From 6922b87e1b5190fce4db6ecc5b416672a8a4d6ba Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 26 Jul 2018 16:05:29 +0200 Subject: 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") Reviewed-by: Quentin Schulz Signed-off-by: Boris Brezillon Signed-off-by: David Oberhollenzer --- ubi-utils/ubimkvol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubi-utils/ubimkvol.c b/ubi-utils/ubimkvol.c index 1950061..b709b43 100644 --- a/ubi-utils/ubimkvol.c +++ b/ubi-utils/ubimkvol.c @@ -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) -- cgit v1.2.3