Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
magic-lantern
magic-lantern
Commits
46d2ca7dedc3
Commit
adfda8c0
authored
Jun 15, 2017
by
g3gg0
Browse files
ml-cbr: use strcmp to stay on safe side (caller might pass arbitrary length)
--HG-- branch : unified
parent
6fb1bf6036a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ml-cbr.c
View file @
46d2ca7d
...
...
@@ -57,11 +57,9 @@ static struct cbr_record_arena * cbr_record_pool = NULL;
static
SEMAPHORE
*
ml_cbr_lock
=
NULL
;
static
inline
int
fast_compare
(
const
char
*
fst
,
const
char
*
snd
)
{
dbg_printf
(
"Checking %s <-> %s
\n
"
,
fst
,
snd
);
return
((
*
(
int64_t
*
)
fst
)
==
(
*
(
int64_t
*
)
snd
))
&&
((
*
(
int64_t
*
)
fst
+
8
)
==
(
*
(
int64_t
*
)
snd
+
8
));
static
inline
int
fast_compare
(
const
char
*
fst
,
const
char
*
snd
)
{
return
strcmp
(
fst
,
snd
)
==
0
;
}
static
inline
struct
cbr_node_arena
*
create_node_arena
()
...
...
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