summaryrefslogtreecommitdiff
path: root/ext/sqlite/sqlite.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-12-18 12:08:50 +0000
committerPierre Joye <pajoye@php.net>2010-12-18 12:08:50 +0000
commitfd161b8ea1ad4521d76871242b232ad13c3c9002 (patch)
tree7b8e2a3c6d56bcd810bee6846ba3efec4c6de609 /ext/sqlite/sqlite.c
parent349082267f9cbef51855612215cdd141d0798faa (diff)
downloadphp-git-fd161b8ea1ad4521d76871242b232ad13c3c9002.tar.gz
- fix possible crash introduced by the null poisoning patch
Diffstat (limited to 'ext/sqlite/sqlite.c')
-rw-r--r--ext/sqlite/sqlite.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index c9673e868b..b5035efd0b 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -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;
}