xiaokang commented on code in PR #240: URL: https://github.com/apache/doris-thirdparty/pull/240#discussion_r1759963263
########## src/core/CLucene/util/CLStreams.h: ########## @@ -207,7 +207,8 @@ class CLUCENE_EXPORT SStringReader : public Reader { tmp = (T *) realloc(tmp, sizeof(T) * (length + 1)); this->buffer_size = length; } - memcpy(tmp, _value, length + 1); + memcpy(tmp, _value, length); Review Comment: I think we should not do use length * sizeof(T), since the input size is just length. I'll change it to use different way for sizeof(T) == 1 and others. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org For additional commands, e-mail: dev-h...@doris.apache.org