]> granicus.if.org Git - php/commitdiff
- fix possible crash introduced by the null poisoning patch
authorPierre Joye <pajoye@php.net>
Sat, 18 Dec 2010 12:08:50 +0000 (12:08 +0000)
committerPierre Joye <pajoye@php.net>
Sat, 18 Dec 2010 12:08:50 +0000 (12:08 +0000)
ext/sqlite/sqlite.c

index c9673e868b264fab94238c35129342f2c8c7a207..b5035efd0b3c2fcc77c29b169d2b7210b8cf1574 100644 (file)
@@ -1641,8 +1641,10 @@ PHP_FUNCTION(sqlite_open)
        }
 
        if (strlen(filename) != filename_len) {
+               zend_restore_error_handling(&error_handling TSRMLS_CC);
                RETURN_FALSE;
        }
+
        if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
                /* resolve the fully-qualified path name to use as the hash key */
                if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
@@ -1697,6 +1699,7 @@ PHP_FUNCTION(sqlite_factory)
        }
 
        if (strlen(filename) != filename_len) {
+               zend_restore_error_handling(&error_handling TSRMLS_CC);
                RETURN_FALSE;
        }