fix:global buffer overflow
This commit is contained in:
parent
652035d8b2
commit
56f7b46ae7
|
@ -32,7 +32,7 @@ extern "C" {
|
||||||
#define TD_VER_MAX UINT64_MAX // TODO: use the real max version from query handle
|
#define TD_VER_MAX UINT64_MAX // TODO: use the real max version from query handle
|
||||||
|
|
||||||
// Bytes for each type.
|
// Bytes for each type.
|
||||||
extern const int32_t TYPE_BYTES[15];
|
extern const int32_t TYPE_BYTES[16];
|
||||||
|
|
||||||
// TODO: replace and remove code below
|
// TODO: replace and remove code below
|
||||||
#define CHAR_BYTES sizeof(char)
|
#define CHAR_BYTES sizeof(char)
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "tcompression.h"
|
#include "tcompression.h"
|
||||||
#include "trow.h"
|
#include "trow.h"
|
||||||
|
|
||||||
const int32_t TYPE_BYTES[15] = {
|
const int32_t TYPE_BYTES[16] = {
|
||||||
-1, // TSDB_DATA_TYPE_NULL
|
-1, // TSDB_DATA_TYPE_NULL
|
||||||
CHAR_BYTES, // TSDB_DATA_TYPE_BOOL
|
CHAR_BYTES, // TSDB_DATA_TYPE_BOOL
|
||||||
CHAR_BYTES, // TSDB_DATA_TYPE_TINYINT
|
CHAR_BYTES, // TSDB_DATA_TYPE_TINYINT
|
||||||
|
@ -34,6 +34,7 @@ const int32_t TYPE_BYTES[15] = {
|
||||||
SHORT_BYTES, // TSDB_DATA_TYPE_USMALLINT
|
SHORT_BYTES, // TSDB_DATA_TYPE_USMALLINT
|
||||||
INT_BYTES, // TSDB_DATA_TYPE_UINT
|
INT_BYTES, // TSDB_DATA_TYPE_UINT
|
||||||
sizeof(uint64_t), // TSDB_DATA_TYPE_UBIGINT
|
sizeof(uint64_t), // TSDB_DATA_TYPE_UBIGINT
|
||||||
|
TSDB_MAX_JSON_TAG_LEN, // TSDB_DATA_TYPE_JSON
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DO_STATICS(__sum, __min, __max, __minIndex, __maxIndex, _list, _index) \
|
#define DO_STATICS(__sum, __min, __max, __minIndex, __maxIndex, _list, _index) \
|
||||||
|
|
Loading…
Reference in New Issue