File unzip-zipbomb-zstd.patch of Package unzip

diff --git a/extract.c b/extract.c
index a177173..4097915 100644
--- a/extract.c
+++ b/extract.c
@@ -3377,7 +3377,7 @@ __GDEF
     }
 
     G.inptr += input.pos;
-    G.incnt = (G.inbuf + INBUFSIZ) - G.inptr;  /* reset for other routines */
+    G.incnt -= G.inptr - G.inbuf;       /* reset for other routines */
 
 uzzstd_cleanup_exit:
     ZSTD_freeDCtx(dctx);
openSUSE Build Service is sponsored by