This is an automated email from the ASF dual-hosted git repository.
airborne pushed a commit to branch clucene-2.0
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene-2.0 by this push:
new a0b5e906c95 [fix](inverted index) fix the heap-buffer-overflow issue
in clucene slop_phrase_query (#234) (#235)
a0b5e906c95 is described below
commit a0b5e906c959fec4c9713d481eadf884b8270b35
Author: airborne12 <[email protected]>
AuthorDate: Mon Jul 29 17:44:25 2024 +0800
[fix](inverted index) fix the heap-buffer-overflow issue in clucene
slop_phrase_query (#234) (#235)
Co-authored-by: zzzxl <[email protected]>
---
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: [email protected]
For additional commands, e-mail: [email protected]