From e44d487011e2bd8abd27d5dd5480d228de6b0ccc Mon Sep 17 00:00:00 2001 From: David Hall Date: Fri, 28 Aug 2020 13:46:21 -0500 Subject: [PATCH] MCOL-4099 fix range check --- utils/funcexp/func_insert.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/funcexp/func_insert.cpp b/utils/funcexp/func_insert.cpp index 9762e8991..b8fa0588c 100644 --- a/utils/funcexp/func_insert.cpp +++ b/utils/funcexp/func_insert.cpp @@ -84,7 +84,7 @@ std::string Func_insert::getStrVal(rowgroup::Row& row, int64_t strLen = cs->numchars(pos, end); // Return the original string if start isn't within the string. - if ((start < 0) || start > strLen) + if ((start < 0) || start >= strLen) return src; if ((length < 0) || (length > strLen))