forked from Mirrors/privacore-open-source-search-engine
strncmp return code check in linkspam
This commit is contained in:
18
linkspam.cpp
18
linkspam.cpp
@ -919,7 +919,7 @@ bool isLinkSpam ( const Url *linker,
|
||||
if ( ! link ) continue;
|
||||
if ( linkLen <= 0 ) continue;
|
||||
if ( linkLen > uulen ) continue;
|
||||
if ( strncmp ( link , uu , uulen ) ) continue;
|
||||
if ( strncmp ( link , uu , uulen ) != 0 ) continue;
|
||||
// got a match, is it a link chain? if not, them we are not
|
||||
goto loop;
|
||||
}
|
||||
@ -1040,10 +1040,10 @@ static bool isLinkChain ( Xml *xml, const Url *linker, const Url *linkee, int32_
|
||||
// there is left/right text, like the guy that had a list
|
||||
// to 3 different gigablast.com links in a row with no
|
||||
// text in between
|
||||
if ( leftUrl.getDomainLen() != linkee->getDomainLen() ) break;
|
||||
if ( strncmp ( leftUrl.getDomain() ,
|
||||
linkee->getDomain() ,
|
||||
linkee->getDomainLen() ) ) break;
|
||||
if ( leftUrl.getDomainLen() != linkee->getDomainLen() )
|
||||
break;
|
||||
if( strncmp(leftUrl.getDomain(), linkee->getDomain(), linkee->getDomainLen()) != 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
// we start off in link text, since linkNode is an <a> tag
|
||||
@ -1111,10 +1111,10 @@ static bool isLinkChain ( Xml *xml, const Url *linker, const Url *linkee, int32_
|
||||
// there is left/right text, like the guy that had a list
|
||||
// to 3 different gigablast.com links in a row with no
|
||||
// text in between
|
||||
if ( rightUrl.getDomainLen() != linkee->getDomainLen() ) break;
|
||||
if ( strncmp ( rightUrl.getDomain() ,
|
||||
linkee->getDomain() ,
|
||||
linkee->getDomainLen() ) ) break;
|
||||
if ( rightUrl.getDomainLen() != linkee->getDomainLen() )
|
||||
break;
|
||||
if ( strncmp(rightUrl.getDomain(), linkee->getDomain(), linkee->getDomainLen()) != 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( tableLeft && tableRight ) {
|
||||
|
Reference in New Issue
Block a user