Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
23d6cebf
Commit
23d6cebf
authored
Sep 06, 2022
by
Poul-Henning Kamp
Committed by
Dridi Boukelmoune
Oct 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync libvgz with upstream zlib.
Varnish is not subject to CVE 2022 37434, we never use "extra" data.
parent
2b4b7070
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
crc32.c
lib/libvgz/crc32.c
+4
-4
inflate.c
lib/libvgz/inflate.c
+3
-2
zconf.h
lib/libvgz/zconf.h
+6
-0
No files found.
lib/libvgz/crc32.c
View file @
23d6cebf
...
...
@@ -635,7 +635,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
#endif
/* DYNAMIC_CRC_TABLE */
/* Pre-condition the CRC */
crc
^=
0xffffffff
;
crc
=
(
~
crc
)
&
0xffffffff
;
/* Compute the CRC up to a word boundary. */
while
(
len
&&
((
z_size_t
)
buf
&
7
)
!=
0
)
{
...
...
@@ -754,7 +754,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
#endif
/* DYNAMIC_CRC_TABLE */
/* Pre-condition the CRC */
crc
^=
0xffffffff
;
crc
=
(
~
crc
)
&
0xffffffff
;
#ifdef W
...
...
@@ -1082,7 +1082,7 @@ uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
#ifdef DYNAMIC_CRC_TABLE
once
(
&
made
,
make_crc_table
);
#endif
/* DYNAMIC_CRC_TABLE */
return
multmodp
(
x2nmodp
(
len2
,
3
),
crc1
)
^
crc2
;
return
multmodp
(
x2nmodp
(
len2
,
3
),
crc1
)
^
(
crc2
&
0xffffffff
)
;
}
/* ========================================================================= */
...
...
@@ -1117,5 +1117,5 @@ uLong crc32_combine_op(crc1, crc2, op)
uLong
crc2
;
uLong
op
;
{
return
multmodp
(
op
,
crc1
)
^
crc2
;
return
multmodp
(
op
,
crc1
)
^
(
crc2
&
0xffffffff
)
;
}
lib/libvgz/inflate.c
View file @
23d6cebf
...
...
@@ -771,8 +771,9 @@ int flush;
if
(
copy
>
have
)
copy
=
have
;
if
(
copy
)
{
if
(
state
->
head
!=
Z_NULL
&&
state
->
head
->
extra
!=
Z_NULL
)
{
len
=
state
->
head
->
extra_len
-
state
->
length
;
state
->
head
->
extra
!=
Z_NULL
&&
(
len
=
state
->
head
->
extra_len
-
state
->
length
)
<
state
->
head
->
extra_max
)
{
zmemcpy
(
state
->
head
->
extra
+
len
,
next
,
len
+
copy
>
state
->
head
->
extra_max
?
state
->
head
->
extra_max
-
len
:
copy
);
...
...
lib/libvgz/zconf.h
View file @
23d6cebf
...
...
@@ -8,6 +8,12 @@
#ifndef ZCONF_H
#define ZCONF_H
#if defined(Z_SOLO)
#include <sys/types.h>
#define Z_U8 __uint64_t
#define Z_U4 __uint32_t
#endif
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment