summaryrefslogtreecommitdiff
path: root/ext/phar/util.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
committerDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
commit5eb1f92f31cafc48384f9096012f421b37f6d425 (patch)
tree4ed67b92229407e7b5cbab37b96428fe80eb3f94 /ext/phar/util.c
parent925f05dd1a35eafa71eb29abb69cdfc31a23a75d (diff)
downloadphp-git-5eb1f92f31cafc48384f9096012f421b37f6d425.tar.gz
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
Diffstat (limited to 'ext/phar/util.c')
-rw-r--r--ext/phar/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/phar/util.c b/ext/phar/util.c
index 349fc6be57..7652846eca 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -1523,7 +1523,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type,
if (FAILURE == phar_call_openssl_signverify(0, fp, end_of_phar, pubkey ? ZSTR_VAL(pubkey) : NULL, pubkey ? ZSTR_LEN(pubkey) : 0, &sig, &tempsig)) {
if (pubkey) {
- zend_string_release(pubkey);
+ zend_string_release_ex(pubkey, 0);
}
if (error) {
@@ -1534,7 +1534,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type,
}
if (pubkey) {
- zend_string_release(pubkey);
+ zend_string_release_ex(pubkey, 0);
}
sig_len = tempsig;
@@ -1542,7 +1542,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type,
in = BIO_new_mem_buf(pubkey ? ZSTR_VAL(pubkey) : NULL, pubkey ? ZSTR_LEN(pubkey) : 0);
if (NULL == in) {
- zend_string_release(pubkey);
+ zend_string_release_ex(pubkey, 0);
if (error) {
spprintf(error, 0, "openssl signature could not be processed");
}
@@ -1551,7 +1551,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type,
key = PEM_read_bio_PUBKEY(in, NULL,NULL, NULL);
BIO_free(in);
- zend_string_release(pubkey);
+ zend_string_release_ex(pubkey, 0);
if (NULL == key) {
if (error) {