File htstats-3.2-zerowordssegfault.patch of Package htdig

--- httools/htstat.cc
+++ httools/htstat.cc
@@ -158,7 +158,8 @@
     if(words.Open(config->Find("word_db"), O_RDONLY) == OK)
       {
 	cout << "htstat: Total words: " << words.WordRefs()->Count() << endl;
-	cout << "htstat: Total unique words: " << words.Words()->Count() << endl;
+	if (words.WordRefs()->Count() != 0)
+		cout << "htstat: Total unique words: " << words.Words()->Count() << endl;
 	words.Close();
       }
 
openSUSE Build Service is sponsored by