* [PATCH mtd-utils] ubi-utils: ubimkvol: Initialize req to zero to make sure no flags are set by default
@ 2018-07-26 14:05 Boris Brezillon
2018-07-26 14:09 ` Quentin Schulz
2018-07-26 22:57 ` David Oberhollenzer
0 siblings, 2 replies; 3+ messages in thread
From: Boris Brezillon @ 2018-07-26 14:05 UTC (permalink / raw)
To: David Oberhollenzer
Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, linux-mtd, Quentin Schulz
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 <boris.brezillon@bootlin.com>
---
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 195006133216..b709b43a8318 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)
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH mtd-utils] ubi-utils: ubimkvol: Initialize req to zero to make sure no flags are set by default
2018-07-26 14:05 [PATCH mtd-utils] ubi-utils: ubimkvol: Initialize req to zero to make sure no flags are set by default Boris Brezillon
@ 2018-07-26 14:09 ` Quentin Schulz
2018-07-26 22:57 ` David Oberhollenzer
1 sibling, 0 replies; 3+ messages in thread
From: Quentin Schulz @ 2018-07-26 14:09 UTC (permalink / raw)
To: Boris Brezillon
Cc: David Oberhollenzer, David Woodhouse, Brian Norris, Marek Vasut,
Richard Weinberger, linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
Hi Boris,
On Thu, Jul 26, 2018 at 04:05:29PM +0200, Boris Brezillon wrote:
> 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 <boris.brezillon@bootlin.com>
Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
> ---
> 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 195006133216..b709b43a8318 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)
> --
> 2.14.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH mtd-utils] ubi-utils: ubimkvol: Initialize req to zero to make sure no flags are set by default
2018-07-26 14:05 [PATCH mtd-utils] ubi-utils: ubimkvol: Initialize req to zero to make sure no flags are set by default Boris Brezillon
2018-07-26 14:09 ` Quentin Schulz
@ 2018-07-26 22:57 ` David Oberhollenzer
1 sibling, 0 replies; 3+ messages in thread
From: David Oberhollenzer @ 2018-07-26 22:57 UTC (permalink / raw)
To: Boris Brezillon
Cc: David Woodhouse, Brian Norris, Marek Vasut, Richard Weinberger,
linux-mtd, Quentin Schulz
Applied to mtd-utils.git master.
Thanks,
David
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-26 22:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-26 14:05 [PATCH mtd-utils] ubi-utils: ubimkvol: Initialize req to zero to make sure no flags are set by default Boris Brezillon
2018-07-26 14:09 ` Quentin Schulz
2018-07-26 22:57 ` David Oberhollenzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox