Loading ndb/include/util/UtilBuffer.hpp +6 −2 Original line number Diff line number Diff line Loading @@ -73,11 +73,15 @@ public: } int assign(const void * d, size_t l) { if (data) free(data); /* Free the old data only after copying, in case d==data. */ void *old_data= data; data = NULL; len = 0; alloc_size = 0; return append(d, l); int ret= append(d, l); if (old_data) free(old_data); return ret; } void clear() { Loading ndb/src/common/util/SimpleProperties.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ SimpleProperties::pack(Writer & it, const void * __src, const char * src_len = _src + _map[i].Length_Offset; Uint32 len = *((Uint32*)src_len); if(!ignoreMinMax){ if(len == _map[i].maxValue) if(len > _map[i].maxValue) return ValueTooHigh; } ok = it.add(_map[i].Key, src, len); Loading @@ -254,7 +254,7 @@ SimpleProperties::pack(Writer & it, const void * __src, case SimpleProperties::StringValue: if(!ignoreMinMax){ size_t len = strlen(src); if(len == _map[i].maxValue) if(len > _map[i].maxValue) return ValueTooHigh; } ok = it.add(_map[i].Key, src); Loading Loading
ndb/include/util/UtilBuffer.hpp +6 −2 Original line number Diff line number Diff line Loading @@ -73,11 +73,15 @@ public: } int assign(const void * d, size_t l) { if (data) free(data); /* Free the old data only after copying, in case d==data. */ void *old_data= data; data = NULL; len = 0; alloc_size = 0; return append(d, l); int ret= append(d, l); if (old_data) free(old_data); return ret; } void clear() { Loading
ndb/src/common/util/SimpleProperties.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ SimpleProperties::pack(Writer & it, const void * __src, const char * src_len = _src + _map[i].Length_Offset; Uint32 len = *((Uint32*)src_len); if(!ignoreMinMax){ if(len == _map[i].maxValue) if(len > _map[i].maxValue) return ValueTooHigh; } ok = it.add(_map[i].Key, src, len); Loading @@ -254,7 +254,7 @@ SimpleProperties::pack(Writer & it, const void * __src, case SimpleProperties::StringValue: if(!ignoreMinMax){ size_t len = strlen(src); if(len == _map[i].maxValue) if(len > _map[i].maxValue) return ValueTooHigh; } ok = it.add(_map[i].Key, src); Loading