[clucene09] Fix uninitialized read in Lexer::ReadEscape

Kevin Kofler kkofler at fedoraproject.org
Sat Oct 25 21:12:27 UTC 2014


commit 1cf69ff0f6bb18eec58ec5d93088038dbb68d50e
Author: Kevin Kofler <Kevin at tigcc.ticalc.org>
Date:   Sat Oct 25 23:12:20 2014 +0200

    Fix uninitialized read in Lexer::ReadEscape
    
    Hopefully, that fixes the testsuite failure.

 clucene-core-0.9.21b-fix-unescaping.patch |   11 +++++++++++
 clucene09.spec                            |    5 +++++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/clucene-core-0.9.21b-fix-unescaping.patch b/clucene-core-0.9.21b-fix-unescaping.patch
new file mode 100644
index 0000000..48aef1b
--- /dev/null
+++ b/clucene-core-0.9.21b-fix-unescaping.patch
@@ -0,0 +1,11 @@
+diff -ur clucene-core-0.9.21b/src/CLucene/queryParser/Lexer.cpp clucene-core-0.9.21b-fix-unescaping/src/CLucene/queryParser/Lexer.cpp
+--- clucene-core-0.9.21b/src/CLucene/queryParser/Lexer.cpp	2008-10-23 19:44:35.000000000 +0200
++++ clucene-core-0.9.21b-fix-unescaping/src/CLucene/queryParser/Lexer.cpp	2014-10-25 22:59:57.000000000 +0200
+@@ -354,6 +354,7 @@
+    TCHAR ch = prev;
+    int bp=0;
+    buf[bp++] = ch;
++   buf[bp] = 0;
+ 
+    ch = reader->GetNext();
+    int32_t idx = _tcscspn( buf, _T("\\+-!():^[]{}\"~*") );
diff --git a/clucene09.spec b/clucene09.spec
index c9bbac5..89e6aa8 100644
--- a/clucene09.spec
+++ b/clucene09.spec
@@ -21,6 +21,9 @@ Patch3: clucene-core-0.9.21b-fix-soversion.patch
 # make tests always verbose
 Patch4: clucene-core-0.9.21b-verbose-tests.patch
 
+# fix uninitialized read in Lexer::ReadEscape
+Patch5: clucene-core-0.9.21b-fix-unescaping.patch
+
 %description
 CLucene is a C++ port of Lucene. It is a high-performance, full-
 featured text search engine written in C++. CLucene is faster than
@@ -64,6 +67,7 @@ to work with the newer version and the newer API.
 %patch3 -p1 -b .fix-soversion
 touch src/Makefile.in
 %patch4 -p1 -b .verbose-tests
+%patch5 -p1 -b .fix-unescaping
 
 %build
 %configure --disable-static
@@ -123,6 +127,7 @@ rm -rf $RPM_BUILD_ROOT
 - Bump soversion to 3.0.1, as apparently intended by upstream to begin with
 - Better GCC 4.8 fix, works with refcount without adding throwspecs everywhere
 - Make tests always verbose
+- Fix uninitialized read in Lexer::ReadEscape
 
 * Sat Aug 16 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.21b-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild


More information about the scm-commits mailing list