]> granicus.if.org Git - php/commitdiff
Fixed uninitialized data
authorDmitry Stogov <dmitry@zend.com>
Thu, 23 Mar 2017 15:59:27 +0000 (18:59 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 23 Mar 2017 15:59:27 +0000 (18:59 +0300)
ext/oci8/oci8_statement.c

index 950affde4aac3a950ade19aaddbb65c7cb7d77f7..467e2689dc9df4fc259b0395b286c67d05317e66 100644 (file)
@@ -1722,6 +1722,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le
        }
        
        bind = emalloc(sizeof(php_oci_bind));
+       ZVAL_UNDEF(&bind->parameter);
        bind->array.elements            = (text *)safe_emalloc(max_table_length * (maxlength + 1), sizeof(text), 0);
        memset(bind->array.elements, 0, max_table_length * (maxlength + 1) * sizeof(text));
        bind->array.current_length      = zend_hash_num_elements(Z_ARRVAL_P(var));
@@ -1781,6 +1782,7 @@ php_oci_bind *php_oci_bind_array_helper_number(zval *var, zend_long max_table_le
        hash = HASH_OF(var);
 
        bind = emalloc(sizeof(php_oci_bind));
+       ZVAL_UNDEF(&bind->parameter);
        bind->array.elements            = (ub4 *)safe_emalloc(max_table_length, sizeof(ub4), 0);
        bind->array.current_length      = zend_hash_num_elements(Z_ARRVAL_P(var));
        bind->array.old_length          = bind->array.current_length;
@@ -1820,6 +1822,7 @@ php_oci_bind *php_oci_bind_array_helper_double(zval *var, zend_long max_table_le
        hash = HASH_OF(var);
 
        bind = emalloc(sizeof(php_oci_bind));
+       ZVAL_UNDEF(&bind->parameter);
        bind->array.elements            = (double *)safe_emalloc(max_table_length, sizeof(double), 0);
        bind->array.current_length      = zend_hash_num_elements(Z_ARRVAL_P(var));
        bind->array.old_length          = bind->array.current_length;
@@ -1860,6 +1863,7 @@ php_oci_bind *php_oci_bind_array_helper_date(zval *var, zend_long max_table_leng
        hash = HASH_OF(var);
 
        bind = emalloc(sizeof(php_oci_bind));
+       ZVAL_UNDEF(&bind->parameter);
        bind->array.elements            = (OCIDate *)safe_emalloc(max_table_length, sizeof(OCIDate), 0);
        bind->array.current_length      = zend_hash_num_elements(Z_ARRVAL_P(var));
        bind->array.old_length          = bind->array.current_length;