1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: Stanislav Klinov <tomat@sphinxsearch.com>
Date: Tue, 6 Sep 2016 23:15:34 +0300
Subject: [PATCH] fixed #2504 daemon crash on snippet generation for empty
documents with html_strip enabled
---
src/sphinx.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/sphinx.cpp b/src/sphinx.cpp
index d6a7b9d..698b8af 100644
--- a/src/sphinx.cpp
+++ b/src/sphinx.cpp
@@ -25272,6 +25272,9 @@ static inline int HtmlEntityLookup ( const BYTE * str, int len )
void CSphHTMLStripper::Strip ( BYTE * sData ) const
{
+ if ( !sData )
+ return;
+
const BYTE * s = sData;
BYTE * d = sData;
for ( ;; )
|