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
b2bbb505
Commit
b2bbb505
authored
Feb 02, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Neuter another case where AddressSanitizer chokes on FreeBSD's
hyperwide memcmp()
parent
776c8386
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
cache_ban.c
bin/varnishd/cache/cache_ban.c
+2
-2
No files found.
bin/varnishd/cache/cache_ban.c
View file @
b2bbb505
...
@@ -143,10 +143,10 @@ ban_equal(const uint8_t *bs1, const uint8_t *bs2)
...
@@ -143,10 +143,10 @@ ban_equal(const uint8_t *bs1, const uint8_t *bs2)
/*
/*
* Compare two ban-strings.
* Compare two ban-strings.
* The memcmp() is safe because the first field we compare is the
* length and that is part of the fixed header structure.
*/
*/
u
=
vbe32dec
(
bs1
+
BANS_LENGTH
);
u
=
vbe32dec
(
bs1
+
BANS_LENGTH
);
if
(
u
!=
vbe32dec
(
bs2
+
BANS_LENGTH
))
return
(
0
);
return
(
!
memcmp
(
bs1
+
BANS_LENGTH
,
bs2
+
BANS_LENGTH
,
u
-
BANS_LENGTH
));
return
(
!
memcmp
(
bs1
+
BANS_LENGTH
,
bs2
+
BANS_LENGTH
,
u
-
BANS_LENGTH
));
}
}
...
...
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