forked from Mirrors/privacore-open-source-search-engine
Fix buffer overflow for RdbList when trace log is enabled
This commit is contained in:
@ -131,7 +131,7 @@ void RdbList::set(char *list, int32_t listSize, char *alloc, int32_t allocSize,
|
||||
int32_t fixedDataSize, bool ownData, bool useHalfKeys, char keySize) {
|
||||
logTrace(g_conf.m_logTraceRdbList, "BEGIN. list=%p listSize=%" PRId32" alloc=%p allocSize=%" PRId32,
|
||||
list, listSize, alloc, allocSize);
|
||||
char logbuf1[50],logbuf2[50];
|
||||
char logbuf1[MAX_KEYSTR_BYTES],logbuf2[MAX_KEYSTR_BYTES];
|
||||
logTrace(g_conf.m_logTraceRdbList, "startKey=%s endKey=%s keySize=%hhu fixedDataSize=%" PRId32,
|
||||
KEYSTR(startKey, keySize,logbuf1), KEYSTR(endKey, keySize,logbuf2), keySize, fixedDataSize);
|
||||
|
||||
|
1
types.h
1
types.h
@ -10,6 +10,7 @@
|
||||
typedef int16_t collnum_t;
|
||||
|
||||
#define MAX_KEY_BYTES 28
|
||||
#define MAX_KEYSTR_BYTES ((MAX_KEY_BYTES*2)+3)
|
||||
|
||||
class u_int96_t {
|
||||
|
||||
|
Reference in New Issue
Block a user