diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 2023-11-06 15:00:28 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-11-06 15:00:28 +0000 |
commit | 59a3aff685fdb930244c7aa439e121b60e50f266 (patch) | |
tree | cd8ada8812a2fa947da8c903792d4c90d4b286e1 /hw/core/loader.c | |
parent | cc8fb0c3ae3c950eb40e969607e17ff16a7519ac (diff) | |
download | qemu-59a3aff685fdb930244c7aa439e121b60e50f266.zip qemu-59a3aff685fdb930244c7aa439e121b60e50f266.tar.gz qemu-59a3aff685fdb930244c7aa439e121b60e50f266.tar.bz2 |
hw/core/loader: gunzip(): initialize z_stream
Coverity signals that variable as being used uninitialized. And really,
when work with external APIs that's better to zero out the structure,
where we set some fields by hand.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Maksim Davydov <davydov-max@yandex-team.ru>
Message-id: 20231017125941.810461-6-vsementsov@yandex-team.ru
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/core/loader.c')
-rw-r--r-- | hw/core/loader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/loader.c b/hw/core/loader.c index 4dd5a71..b7bb44b 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -558,7 +558,7 @@ static void zfree(void *x, void *addr) ssize_t gunzip(void *dst, size_t dstlen, uint8_t *src, size_t srclen) { - z_stream s; + z_stream s = {}; ssize_t dstbytes; int r, i, flags; |