From 4203d9628cc49dfdad684e3d763949dcb805e066 Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Tue, 5 Dec 2023 20:57:22 +0000 Subject: [PATCH] igzip: fix null-terminated string setting Signed-off-by: Pablo de Lara --- igzip/igzip_inflate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/igzip/igzip_inflate.c b/igzip/igzip_inflate.c index f5845f4..9e52347 100644 --- a/igzip/igzip_inflate.c +++ b/igzip/igzip_inflate.c @@ -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;