From 1499433043e3def1ad7002c7e3d7384b6c760467 Mon Sep 17 00:00:00 2001 From: David Hall Date: Fri, 19 Jun 2020 17:33:45 -0500 Subject: [PATCH] MCOL-2221 Terminate the buffer --- utils/funcexp/func_reverse.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/funcexp/func_reverse.cpp b/utils/funcexp/func_reverse.cpp index edbedf183..edda9cab6 100644 --- a/utils/funcexp/func_reverse.cpp +++ b/utils/funcexp/func_reverse.cpp @@ -64,6 +64,7 @@ std::string Func_reverse::getStrVal(rowgroup::Row& row, const char* end = pos + binLen; char* pbuf = new char[binLen + 1]; + pbuf[binLen] = 0; char* tmp = pbuf + binLen; if (cs->use_mb()) // uses multi-byte characters