From 7c3afbafa793ec67f69f86b0f7f3d595489d7c1b Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Tue, 1 Sep 2015 14:45:41 +0200 Subject: [PATCH] Test for empty term before dereferencing utf-8 iterator --HG-- branch : WINDOWSPORT --- src/rcldb/expansiondbs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rcldb/expansiondbs.cpp b/src/rcldb/expansiondbs.cpp index 82721cef..5df513e6 100644 --- a/src/rcldb/expansiondbs.cpp +++ b/src/rcldb/expansiondbs.cpp @@ -97,6 +97,8 @@ bool createExpansionDbs(Xapian::WritableDatabase& wdb, // Detect and skip CJK terms. Utf8Iter utfit(*it); + if (utfit.eof()) // Empty term?? Seems to happen. + continue; if (TextSplit::isCJK(*utfit)) { // LOGDEB(("stemskipped: Skipping CJK\n")); continue;