Commit adfda8c0 authored by g3gg0's avatar g3gg0
Browse files

ml-cbr: use strcmp to stay on safe side (caller might pass arbitrary length)

--HG--
branch : unified
parent 6fb1bf6036a8
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment