mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
unzip: patch CVE-2015-7696, CVE-2015-7697 and integer underflow
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
15
utils/unzip/patches/006-CVE-2015-7697-infinite-loop.patch
Normal file
15
utils/unzip/patches/006-CVE-2015-7697-infinite-loop.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
--- a/extract.c
|
||||
+++ b/extract.c
|
||||
@@ -2728,6 +2728,12 @@ __GDEF
|
||||
int repeated_buf_err;
|
||||
bz_stream bstrm;
|
||||
|
||||
+ if (G.incnt <= 0 && G.csize <= 0L) {
|
||||
+ /* avoid an infinite loop */
|
||||
+ Trace((stderr, "UZbunzip2() got empty input\n"));
|
||||
+ return 2;
|
||||
+ }
|
||||
+
|
||||
#if (defined(DLL) && !defined(NO_SLIDE_REDIR))
|
||||
if (G.redirect_slide)
|
||||
wsize = G.redirect_size, redirSlide = G.redirect_buffer;
|
||||
Reference in New Issue
Block a user