mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Remove nonsensical code from odbc_execute() (#18767)
strlen() operates on NUL-terminated strings, writing a NUL byte at the strlen offset accomplishes nothing but wasting cycles.
This commit is contained in:
@@ -1068,7 +1068,6 @@ PHP_FUNCTION(odbc_execute)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
filename = estrndup(&ZSTR_VAL(tmpstr)[1], ZSTR_LEN(tmpstr) - 2);
|
||||
filename[strlen(filename)] = '\0';
|
||||
|
||||
/* Check the basedir */
|
||||
if (php_check_open_basedir(filename)) {
|
||||
|
||||
Reference in New Issue
Block a user