mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fix GH-9032: SQLite3 authorizer crashes on NULL values
This commit is contained in:
commit
ca84d06bbc
5 changed files with 64 additions and 2 deletions
|
@ -2034,6 +2034,9 @@ static int php_sqlite3_authorizer(void *autharg, int action, const char *arg1, c
|
|||
/* Check open_basedir restrictions first */
|
||||
if (PG(open_basedir) && *PG(open_basedir)) {
|
||||
if (action == SQLITE_ATTACH) {
|
||||
if (!arg1) {
|
||||
return SQLITE_DENY;
|
||||
}
|
||||
if (memcmp(arg1, ":memory:", sizeof(":memory:")) && *arg1) {
|
||||
if (strncmp(arg1, "file:", 5) == 0) {
|
||||
/* starts with "file:" */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue