igzip: fix null-terminated string setting

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
Pablo de Lara 2023-12-05 20:57:22 +00:00 committed by Tomasz Kantecki
parent 4a4635e8db
commit 4203d9628c

View File

@ -1886,7 +1886,7 @@ static inline uint32_t string_header_copy(struct inflate_state *state,
state->avail_in--;
state->count = 0;
if (str_buf != NULL)
str_buf[len] = 0;
str_buf[offset + len] = 0;
}
return 0;