mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02: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:
parent
1aae2ad91b
commit
7f91462019
1 changed files with 0 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue