From 1ee9e847c7ff20f1929d9468dfe9762f06ef5d14 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 29 May 2019 11:35:35 +0200 Subject: [PATCH] dnsbulktest: Explicitely check that find() returned 0 std::string::find() will return 0 if the line starts with '.', but it was not obvious from the existing code whether we tested for 0 or a string::npos since we treated the return value as a boolean. Reported by Coverity (CID 1401631). --- pdns/dnsbulktest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsbulktest.cc b/pdns/dnsbulktest.cc index 27a288173..c2f21ba92 100644 --- a/pdns/dnsbulktest.cc +++ b/pdns/dnsbulktest.cc @@ -293,7 +293,7 @@ try split=splitField(line,','); if (split.second.empty()) split=splitField(line,'\t'); - if(!split.second.find('.')) // skip 'Hidden profile' in quantcast list. + if(split.second.find('.') == 0) // skip 'Hidden profile' in quantcast list. continue; pos=split.second.find('/'); if(pos != string::npos) // alexa has whole urls in the list now. -- 2.40.0