forked from Mirrors/privacore-open-source-search-engine
Explicit padding to avoid uninitialized bytes in network traffic
This commit is contained in:
@ -16,6 +16,9 @@
|
||||
#include "GigablastRequest.h"
|
||||
#include "Process.h"
|
||||
#include "Mem.h"
|
||||
#ifdef _VALGRIND_
|
||||
#include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
||||
|
||||
class State13 {
|
||||
@ -272,7 +275,9 @@ bool Msg1c::reindexQuery ( const char *query,
|
||||
|
||||
// reset again just in case
|
||||
m_msg3a.m_msg39req.reset();
|
||||
|
||||
#ifdef _VALGRIND_
|
||||
VALGRIND_CHECK_MEM_IS_DEFINED(&m_msg3a.m_msg39req,sizeof(m_msg3a.m_msg39req));
|
||||
#endif
|
||||
// set our Msg39Request
|
||||
m_msg3a.m_msg39req.m_collnum = m_collnum;
|
||||
m_msg3a.m_msg39req.m_docsToGet = endNum;
|
||||
|
@ -5,12 +5,16 @@
|
||||
struct WordVariationsConfig {
|
||||
bool m_wiktionaryWordVariations;
|
||||
bool m_languageSpecificWordVariations;
|
||||
char _padding0;
|
||||
char _padding1;
|
||||
float m_word_variations_threshold;
|
||||
WordVariationWeights m_word_variations_weights;
|
||||
|
||||
WordVariationsConfig()
|
||||
: m_wiktionaryWordVariations(false),
|
||||
m_languageSpecificWordVariations(false),
|
||||
_padding0(0),
|
||||
_padding1(0),
|
||||
m_word_variations_threshold(1.0),
|
||||
m_word_variations_weights()
|
||||
{}
|
||||
|
Reference in New Issue
Block a user