From fd161b8ea1ad4521d76871242b232ad13c3c9002 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 18 Dec 2010 12:08:50 +0000 Subject: [PATCH] - fix possible crash introduced by the null poisoning patch --- ext/sqlite/sqlite.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.40.0