You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/09/28 02:37:19 UTC

[doris] branch branch-1.1-lts updated: [Bug](function) core dump on substr #13007

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-1.1-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.1-lts by this push:
     new a4b83dc2f1 [Bug](function) core dump on substr #13007
a4b83dc2f1 is described below

commit a4b83dc2f1d146f2d2b2b04e6b83237774dc22fe
Author: Pxl <px...@qq.com>
AuthorDate: Wed Sep 28 08:54:49 2022 +0800

    [Bug](function) core dump on substr #13007
---
 be/src/vec/functions/function_string.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/be/src/vec/functions/function_string.h b/be/src/vec/functions/function_string.h
index 0200adf495..f0566b2d80 100644
--- a/be/src/vec/functions/function_string.h
+++ b/be/src/vec/functions/function_string.h
@@ -188,6 +188,10 @@ private:
             }
 
             int fixed_pos = start[i];
+            if (fixed_pos < -(int)index.size()) {
+                StringOP::push_empty_string(i, res_chars, res_offsets);
+                continue;
+            }
             if (fixed_pos < 0) {
                 fixed_pos = index.size() + fixed_pos + 1;
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org