From 12516d93a77296daa24496d9c5f5a00bfb8d0a3d Mon Sep 17 00:00:00 2001 From: Ben Thompson Date: Thu, 29 Sep 2016 14:41:53 -0500 Subject: [PATCH] MCOL-331: Fix position 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 521347673..519f860bc 100644 --- a/utils/funcexp/func_insert.cpp +++ b/utils/funcexp/func_insert.cpp @@ -52,7 +52,7 @@ string insertStr(const string& src, int pos, int len, const string& targ) { int64_t strLen = static_cast(src.length()); - if ((pos <= 0) || ((pos-1) > strLen)) + if ((pos <= 0) || ((pos-1) >= strLen)) return src; if ((len < 0) || (len > strLen))