mirror of
https://github.com/scr34m/php-malware-scanner.git
synced 2026-06-16 12:30:35 +00:00
Cast $needle in calls to strpos/stripos to string to avoid automatic ordinal conversion of integer patterns
This commit is contained in:
4
scan.php
4
scan.php
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user