Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-pcre2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
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-pcre2
Commits
99636168
Commit
99636168
authored
Feb 22, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use WS_Assert_Allocated() from Varnish
parent
3e49b60e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
vmod_pcre2.c
src/vmod_pcre2.c
+3
-10
No files found.
src/vmod_pcre2.c
View file @
99636168
...
...
@@ -91,13 +91,6 @@ errmsg(VRT_CTX, const char *fmt, ...)
va_end
(
args
);
}
static
inline
void
WS_Allocated
(
struct
ws
*
const
restrict
ws
,
const
void
*
const
restrict
ptr
,
const
size_t
len
)
{
assert
((
char
*
)
ptr
>=
ws
->
s
&&
((
char
*
)
ptr
+
len
)
<=
ws
->
f
);
}
static
inline
int
get_pcre2_errmsg
(
struct
ws
*
const
restrict
ws
,
int
errcode
,
char
*
restrict
*
const
restrict
buf
)
...
...
@@ -148,7 +141,7 @@ ws_free(void *ptr, void *ws)
{
VSL
(
SLT_Debug
,
0
,
"free ptr = %p, ws = %p"
,
ptr
,
ws
);
WS_Assert
(
ws
);
WS_Allocated
(
ws
,
ptr
,
0
);
WS_A
ssert_A
llocated
(
ws
,
ptr
,
0
);
}
static
void
...
...
@@ -423,7 +416,7 @@ vmod_regex_match(VRT_CTX, struct vmod_pcre2_regex *regex,
* pcre2_general_context is declared as an incomplete
* type, so we can't check if it's full size is allocated.
*/
WS_Allocated
(
ctx
->
ws
,
gctx_task
->
priv
,
0
);
WS_A
ssert_A
llocated
(
ctx
->
ws
,
gctx_task
->
priv
,
0
);
gctx
=
gctx_task
->
priv
;
}
...
...
@@ -496,7 +489,7 @@ vmod_regex_match(VRT_CTX, struct vmod_pcre2_regex *regex,
* As with the general context above, pcre2_match_data is
* an incomplete type.
*/
WS_Allocated
(
ctx
->
ws
,
match_task
->
priv
,
0
);
WS_A
ssert_A
llocated
(
ctx
->
ws
,
match_task
->
priv
,
0
);
mdata
=
match_task
->
priv
;
}
...
...
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