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

panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new e9d267309b7 [fix](func) Fix BE core dump caused by buffer access out 
of bounds (#44919)
e9d267309b7 is described below

commit e9d267309b7f06b12cb956d44bb66aeffbccdda3
Author: zxealous <zhouchang...@baidu.com>
AuthorDate: Wed Dec 4 11:21:24 2024 +0800

    [fix](func) Fix BE core dump caused by buffer access out of bounds (#44919)
    
    Fix BE core dump caused by buffer access out of bounds
---
 be/src/vec/functions/function_string.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/vec/functions/function_string.cpp 
b/be/src/vec/functions/function_string.cpp
index cee141db2a7..89737d03453 100644
--- a/be/src/vec/functions/function_string.cpp
+++ b/be/src/vec/functions/function_string.cpp
@@ -894,7 +894,7 @@ struct StringSpace {
             if (data[i] > 0) {
                 buffer.resize(data[i]);
                 for (size_t j = 0; j < data[i]; ++j) {
-                    buffer[i] = ' ';
+                    buffer[j] = ' ';
                 }
                 StringOP::push_value_string(std::string_view(buffer.data(), 
buffer.size()), i,
                                             res_data, res_offsets);


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

Reply via email to