calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / external / clucene / patches / heap-buffer-overflow.patch
blob7421db854cfdec2d2b5df75367a5997e5846f4b7
1 --- src/contribs-lib/CLucene/analysis/cjk/CJKAnalyzer.cpp
2 +++ src/contribs-lib/CLucene/analysis/cjk/CJKAnalyzer.cpp
3 @@ -66,7 +66,7 @@
4 //ucs4(c variable). however, gunichartables doesn't seem to classify
5 //any of the surrogates as alpha, so they are skipped anyway...
6 //so for now we just convert to ucs4 so that we dont corrupt the input.
7 - if ( c >= 0xd800 || c <= 0xdfff ){
8 + if ( (c >= 0xd800 || c <= 0xdfff) && bufferIndex != dataLen ){
9 clunichar c2 = ioBuffer[bufferIndex];
10 if ( c2 >= 0xdc00 && c2 <= 0xdfff ){
11 bufferIndex++;