mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix reading uninitialized memory in BloomFilter.
Bug: 12967899 Change-Id: I180b9d728c887c480b6d956bbc4599079c1c359f
This commit is contained in:
parent
a000a32c80
commit
6890246259
@ -17,6 +17,7 @@
|
||||
#ifndef LATINIME_BLOOM_FILTER_H
|
||||
#define LATINIME_BLOOM_FILTER_H
|
||||
|
||||
#include <cstring>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "defines.h"
|
||||
@ -35,6 +36,7 @@ class BloomFilter {
|
||||
public:
|
||||
BloomFilter() {
|
||||
ASSERT(BIGRAM_FILTER_BYTE_SIZE * 8 >= BIGRAM_FILTER_MODULO);
|
||||
memset(mFilter, 0, sizeof(mFilter));
|
||||
}
|
||||
|
||||
// TODO: uint32_t position
|
||||
|
Loading…
Reference in New Issue
Block a user