diff options
author | André Klitzing <aklitzing@gmail.com> | 2022-03-28 22:58:26 +0200 |
---|---|---|
committer | André Klitzing <aklitzing@gmail.com> | 2022-03-31 08:43:56 +0200 |
commit | a0a2bf2d95d4fcd468b6ce3c2e728d95425dd760 (patch) | |
tree | d00b7e43c0c84446ce11cb976e8c9452dab10c5d /src/3rdparty/zlib/src/inffast.c | |
parent | 2eb7a92aa373f10f4e6828dad640b393279637a3 (diff) |
Update bundled zlib to version 1.2.12
The remaining diff to clean 1.2.12 is archived in the qtpatches.diff file.
Also this fixes CVE-2018-25032.
[ChangeLog][Third-Party Code] zlib was updated to version 1.2.12.
Change-Id: Ifab5d57acdc90ace61f2fd22c6dbb7ec6b4ad319
Pick-to: 6.2 6.3 6.3.0 5.15
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/3rdparty/zlib/src/inffast.c')
-rw-r--r-- | src/3rdparty/zlib/src/inffast.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/3rdparty/zlib/src/inffast.c b/src/3rdparty/zlib/src/inffast.c index 0dbd1dbc09..1fec7f363f 100644 --- a/src/3rdparty/zlib/src/inffast.c +++ b/src/3rdparty/zlib/src/inffast.c @@ -70,7 +70,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ code const FAR *dcode; /* local strm->distcode */ unsigned lmask; /* mask for first level of length codes */ unsigned dmask; /* mask for first level of distance codes */ - code here; /* retrieved table entry */ + code const *here; /* retrieved table entry */ unsigned op; /* code bits, operation, extra bits, or */ /* window position, window bytes to copy */ unsigned len; /* match length, unused bytes */ @@ -107,20 +107,20 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ hold += (unsigned long)(*in++) << bits; bits += 8; } - here = lcode[hold & lmask]; + here = lcode + (hold & lmask); dolen: - op = (unsigned)(here.bits); + op = (unsigned)(here->bits); hold >>= op; bits -= op; - op = (unsigned)(here.op); + op = (unsigned)(here->op); if (op == 0) { /* literal */ - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ? "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); - *out++ = (unsigned char)(here.val); + "inflate: literal 0x%02x\n", here->val)); + *out++ = (unsigned char)(here->val); } else if (op & 16) { /* length base */ - len = (unsigned)(here.val); + len = (unsigned)(here->val); op &= 15; /* number of extra bits */ if (op) { if (bits < op) { @@ -138,14 +138,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ hold += (unsigned long)(*in++) << bits; bits += 8; } - here = dcode[hold & dmask]; + here = dcode + (hold & dmask); dodist: - op = (unsigned)(here.bits); + op = (unsigned)(here->bits); hold >>= op; bits -= op; - op = (unsigned)(here.op); + op = (unsigned)(here->op); if (op & 16) { /* distance base */ - dist = (unsigned)(here.val); + dist = (unsigned)(here->val); op &= 15; /* number of extra bits */ if (bits < op) { hold += (unsigned long)(*in++) << bits; @@ -264,7 +264,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ } } else if ((op & 64) == 0) { /* 2nd level distance code */ - here = dcode[here.val + (hold & ((1U << op) - 1))]; + here = dcode + here->val + (hold & ((1U << op) - 1)); goto dodist; } else { @@ -274,7 +274,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ } } else if ((op & 64) == 0) { /* 2nd level length code */ - here = lcode[here.val + (hold & ((1U << op) - 1))]; + here = lcode + here->val + (hold & ((1U << op) - 1)); goto dolen; } else if (op & 32) { /* end-of-block */ |