com php-src: Merge branch 'PHP-7.0' into PHP-7.1: ext/openssl/openssl.c
| From: | Jakub Zelenka | Date: | Sun, 04 Jun 2017 17:11:49 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.0' into PHP-7.1: ext/openssl/openssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98005@lists.php.net to get a copy of this message | ||
Commit: ff93f74f63994aaf25323dc94366876b1e6c28a4
Author: Jakub Zelenka <bukka@php.net> Sun, 4 Jun 2017 18:11:49 +0100
Parents: 6af1d7ad014ea86c983dd9a59153f3a39073d226 3704947696fe0ee93e025fa85621d297ac7a1e4d
Branches: PHP-7.1
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ff93f74f63994aaf25323dc94366876b1e6c28a4
Log:
Merge branch 'PHP-7.0' into PHP-7.1
Changed paths:
MM ext/openssl/openssl.c
Diff:
diff --cc ext/openssl/openssl.c
index 77897a2,6b382ba..f9d022a
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@@ -874,15 -852,15 +879,17 @@@ static void add_assoc_name_entry(zval
zend_hash_str_update(Z_ARRVAL(subitem), sname, strlen(sname), &tmp);
}
} else {
+ /* it might be better to expand it and pass zval from ZVAL_STRING
+ * to zend_symtable_str_update so we do not silently drop const
+ * but we need a test to cover this part first */
add_assoc_stringl(&subitem, sname, (char *)to_add, to_add_len);
}
+ } else {
+ php_openssl_store_errors();
}
- if (needs_free) {
- /* ASN1_STRING_to_UTF8(3): The buffer out should be freed using free(3) */
- OPENSSL_free(to_add);
+ if (to_add_buf != NULL) {
+ OPENSSL_free(to_add_buf);
}
}