2 Commits

Author SHA1 Message Date
Győrvári Gábor
cd1164dbb5 Merge pull request #80 from elliotkendall/master
Cast $needle in calls to strpos/stripos to string to avoid automatic …
2022-07-25 19:15:19 +02:00
Elliot Kendall
77ebd8abd7 Cast $needle in calls to strpos/stripos to string to avoid automatic ordinal conversion of integer patterns 2022-07-25 09:52:27 -07:00

View File

@@ -709,14 +709,14 @@ class MalwareScanner
//Returns true if the raw string exists in the file contents.
private function scanFunc_STR(&$pattern, &$content)
{
return strpos($content, $pattern);
return strpos($content, (string)$pattern);
}
//Performs raw string, case insensitive matching.
//Returns true if the raw string exists in the file contents, ignoring case.
private function scanFunc_STRI(&$pattern, &$content)
{
return stripos($content, $pattern);
return stripos($content, (string)$pattern);
}
//Performs regular expression matching.