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

airborne pushed a commit to branch clucene
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git


The following commit(s) were added to refs/heads/clucene by this push:
     new fdbf2204031 [fix](inverted index) fix the heap-buffer-overflow issue 
in clucene slop_phrase_query (#234)
fdbf2204031 is described below

commit fdbf2204031128b2bd8505fc73c06403b7c1a815
Author: zzzxl <33418555+zzzxl1...@users.noreply.github.com>
AuthorDate: Mon Jul 29 15:46:11 2024 +0800

    [fix](inverted index) fix the heap-buffer-overflow issue in clucene 
slop_phrase_query (#234)
---
 src/core/CLucene/search/SloppyPhraseScorer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/CLucene/search/SloppyPhraseScorer.cpp 
b/src/core/CLucene/search/SloppyPhraseScorer.cpp
index be9d38c011e..c6d75d5e41d 100644
--- a/src/core/CLucene/search/SloppyPhraseScorer.cpp
+++ b/src/core/CLucene/search/SloppyPhraseScorer.cpp
@@ -112,7 +112,7 @@ CL_NS_DEF(search)
                  }
                  if (m!=NULL) {
                          repeatsLen = m->size();
-                         repeats = _CL_NEWARRAY(PhrasePositions*, repeatsLen + 
1);
+                         repeats = _CL_NEWARRAY(PhrasePositions*, repeatsLen + 
2);
                          PhrasePositionsMap::iterator itr = m->begin();
                          size_t pos = 0;
                          while ( itr!=m->end() ){


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

Reply via email to