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
8a4e28f1
Commit
8a4e28f1
authored
Feb 26, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
in vtx_append(), assert that we do not try to buffer an invalid chunk
parent
e68819f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
vsl_dispatch.c
lib/libvarnishapi/vsl_dispatch.c
+4
-2
No files found.
lib/libvarnishapi/vsl_dispatch.c
View file @
8a4e28f1
...
...
@@ -429,14 +429,15 @@ vtx_append(struct VSLQ *vslq, struct vtx *vtx, const struct VSLC_ptr *start,
size_t
len
)
{
struct
chunk
*
chunk
;
enum
vsl_check
i
;
AN
(
vtx
);
if
(
len
==
0
)
return
;
AN
(
start
);
i
f
(
VSL_Check
(
vslq
->
c
,
start
)
==
vsl_check_valid
&&
!
VTAILQ_EMPTY
(
&
vtx
->
shmchunks_free
))
{
i
=
VSL_Check
(
vslq
->
c
,
start
);
if
(
i
==
vsl_check_valid
&&
!
VTAILQ_EMPTY
(
&
vtx
->
shmchunks_free
))
{
/* Shmref it */
chunk
=
VTAILQ_FIRST
(
&
vtx
->
shmchunks_free
);
CHECK_OBJ_NOTNULL
(
chunk
,
CHUNK_MAGIC
);
...
...
@@ -450,6 +451,7 @@ vtx_append(struct VSLQ *vslq, struct vtx *vtx, const struct VSLC_ptr *start,
/* Append to shmref list */
VTAILQ_INSERT_TAIL
(
&
vslq
->
shmrefs
,
chunk
,
shm
.
shmref
);
}
else
{
assert
(
i
!=
vsl_check_e_inval
);
/* Buffer it */
chunk
=
VTAILQ_LAST
(
&
vtx
->
chunks
,
chunkhead
);
CHECK_OBJ_ORNULL
(
chunk
,
CHUNK_MAGIC
);
...
...
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