mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
cc8fb0c3ae
commit
59a3aff685
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue