summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>1999-12-02 14:37:16 +0000
committerThies C. Arntzen <thies@php.net>1999-12-02 14:37:16 +0000
commitb92d70aabe9b0f7c4adee6c51bb701efb2f982e5 (patch)
tree748019533ded83cb77c30dd6d4109e9dd7b6d2a6
parent6fa71d811b18976745a37085df5ac3c4d26a6e6c (diff)
downloadphp-git-b92d70aabe9b0f7c4adee6c51bb701efb2f982e5.tar.gz
php_fopen_wrapper_for_zend() does *NOT* insert the opened files into any list - the caller needs to fclose() the file. (not sure if this is desired)
fixed "Uninitialized memory read" when including URLs
-rw-r--r--Zend/zend-scanner.l5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend-scanner.l b/Zend/zend-scanner.l
index 0e5ad67ecc..9c1d291d1b 100644
--- a/Zend/zend-scanner.l
+++ b/Zend/zend-scanner.l
@@ -186,6 +186,10 @@ BEGIN_EXTERN_C()
ZEND_API void zend_open_file_dtor(zend_file_handle *fh)
{
switch (fh->type) {
+ case ZEND_HANDLE_FILENAME:
+ fclose(fh->handle.fp);
+ break;
+
case ZEND_HANDLE_FP:
fclose(fh->handle.fp);
break;
@@ -384,6 +388,7 @@ zend_op_array *compile_filename(zval *filename, zend_bool unique CLS_DC)
}
file_handle.filename = filename->value.str.val;
file_handle.type = ZEND_HANDLE_FILENAME;
+ file_handle.opened_path = NULL;
retval = zend_compile_files(1 CLS_CC, 1, &file_handle);
if (file_handle.opened_path) {
free(file_handle.opened_path);