Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-blobdigest
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-blobdigest
Commits
1f6827bc
Commit
1f6827bc
authored
Nov 07, 2016
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add an integrity check when retrieving task data from the current ws
parent
2654795d
Pipeline
#66
skipped
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
vmod_blobdigest.c
src/vmod_blobdigest.c
+10
-1
No files found.
src/vmod_blobdigest.c
View file @
1f6827bc
...
...
@@ -240,6 +240,13 @@ ws_alloc_digest(VRT_CTX, const size_t digestsz,
/* Objects */
static
inline
void
WS_Contains
(
struct
ws
*
const
restrict
ws
,
const
void
*
const
restrict
ptr
,
const
size_t
len
)
{
assert
((
char
*
)
ptr
>=
ws
->
s
&&
(
char
*
)(
ptr
+
len
)
<=
ws
->
e
);
}
static
struct
digest_task
*
get_task
(
const
struct
vrt_ctx
*
const
restrict
ctx
,
const
struct
vmod_blobdigest_digest
*
const
restrict
h
)
...
...
@@ -249,8 +256,10 @@ get_task(const struct vrt_ctx * const restrict ctx,
priv
=
VRT_priv_task
(
ctx
,
(
void
*
)
h
);
AN
(
priv
);
if
(
priv
->
priv
!=
NULL
)
if
(
priv
->
priv
!=
NULL
)
{
CAST_OBJ
(
task
,
priv
->
priv
,
VMOD_BLOBDIGEST_DIGEST_TASK_MAGIC
);
WS_Contains
(
ctx
->
ws
,
task
,
sizeof
(
hash_ctx
));
}
else
{
if
((
task
=
WS_Alloc
(
ctx
->
ws
,
sizeof
(
struct
digest_task
)))
==
NULL
)
...
...
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