]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6' into PHP-7.0
authorNikita Popov <nikic@php.net>
Sat, 13 Feb 2016 17:03:06 +0000 (18:03 +0100)
committerNikita Popov <nikic@php.net>
Sat, 13 Feb 2016 17:03:06 +0000 (18:03 +0100)
Conflicts:
ext/sqlite3/sqlite3.c

1  2 
ext/sqlite3/sqlite3.c

index 6f2656ab515934d090dcd1f21556d0dfacf9eb9c,ce9472a71411554aebcc4d5bc848dd524e158144..912cc9cb2d914c2da896c169e48408866d8b5a4e
@@@ -117,9 -123,10 +117,10 @@@ PHP_METHOD(sqlite3, open
        if (strlen(filename) != filename_len) {
                return;
        }
-       if (memcmp(filename, ":memory:", sizeof(":memory:")) != 0) {
+       if (filename_len != sizeof(":memory:")-1 ||
+                       memcmp(filename, ":memory:", sizeof(":memory:")-1) != 0) {
 -              if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
 -                      zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Unable to expand filepath", 0 TSRMLS_CC);
 +              if (!(fullpath = expand_filepath(filename, NULL))) {
 +                      zend_throw_exception(zend_ce_exception, "Unable to expand filepath", 0);
                        return;
                }