com php-src: Properly initialize variable: ext/ffi/ffi.c
| From: | Christoph Michael Becker | Date: | Sun, 05 May 2019 15:49:54 +0000 |
| Subject: | com php-src: Properly initialize variable: ext/ffi/ffi.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106033@lists.php.net to get a copy of this message | ||
Commit: 30409d6753efc4da50d4a7b1180ff1c442735781
Author: Christoph M. Becker <cmbecker69@gmx.de> Sun, 5 May 2019 17:45:16 +0200
Parents: a760c79f1e3a4766de92973179972335ee38b1cc
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=30409d6753efc4da50d4a7b1180ff1c442735781
Log:
Properly initialize variable
Not all code paths assign to
handle, even though it may be used, so
we make sure that it is initialized to a sane value in the first place.
Changed paths:
M ext/ffi/ffi.c
Diff:
diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c
index c380713..0e0803a 100644
--- a/ext/ffi/ffi.c
+++ b/ext/ffi/ffi.c
@@ -2926,7 +2926,7 @@ ZEND_METHOD(FFI, load) /* {{{ */
size_t code_size, scope_name_len;
zend_ffi *ffi;
zend_bool preload = (CG(compiler_options) & ZEND_COMPILE_PRELOAD) != 0;
- DL_HANDLE handle;
+ DL_HANDLE handle = NULL;
zend_ffi_scope *scope = NULL;
zend_string *name;
zend_ffi_symbol *sym;