diff --git a/gnupg.c b/gnupg.c
index ae4bd25..3baaccf 100644
--- a/gnupg.c
+++ b/gnupg.c
@@ -27,7 +27,7 @@
static int le_gnupg;
-#define PHP_GNUPG_VERSION "1.3"
+#define PHP_GNUPG_VERSION "1.3.1"
#ifdef ZEND_ENGINE_2
static zend_object_handlers gnupg_object_handlers;
@@ -934,7 +934,6 @@ PHP_FUNCTION(gnupg_sign){
RETVAL_STRINGL (userret,ret_size,1);
}
gpgme_data_release (in);
- free (out);
free (userret);
}
@@ -993,7 +992,6 @@ PHP_FUNCTION(gnupg_encrypt){
}
userret = gpgme_data_release_and_get_mem(out,&ret_size);
gpgme_data_release (in);
- free (out);
RETVAL_STRINGL (userret,ret_size,1);
free (userret);
if(ret_size < 1){
@@ -1077,7 +1075,6 @@ PHP_FUNCTION(gnupg_encryptsign){
userret = gpgme_data_release_and_get_mem(out,&ret_size);
gpgme_data_release (in);
- free (out);
RETVAL_STRINGL (userret,ret_size,1);
free (userret);
if(ret_size < 1){
@@ -1166,10 +1163,8 @@ PHP_FUNCTION(gnupg_verify){
ZVAL_STRINGL (plain_text, gpg_plain,gpg_plain_len,1);
}
free (gpg_plain);
- gpgme_data_release_and_get_mem(gpgme_text,&gpg_plain_len);
}
gpgme_data_release (gpgme_sig);
- free (gpgme_text);
}
/* }}} */
@@ -1227,7 +1222,6 @@ PHP_FUNCTION(gnupg_decrypt){
}
userret = gpgme_data_release_and_get_mem(out,&ret_size);
gpgme_data_release (in);
- free (out);
RETVAL_STRINGL (userret,ret_size,1);
free (userret);
if(ret_size < 1){
@@ -1292,7 +1286,6 @@ PHP_FUNCTION(gnupg_decryptverify){
if (decrypt_result->unsupported_algorithm){
GNUPG_ERR ("unsupported algorithm");
gpgme_data_release(in);
- free(out);
return;
}
verify_result = gpgme_op_verify_result (intern->ctx);
@@ -1304,7 +1297,6 @@ PHP_FUNCTION(gnupg_decryptverify){
}
gnupg_fetchsignatures (verify_result->signatures,sig_arr,return_value);
gpgme_data_release (in);
- free (out);
}
/* }}} */
@@ -1346,7 +1338,6 @@ PHP_FUNCTION(gnupg_export){
RETVAL_FALSE;
}
free(userret);
- free(out);
}
/* }}} */
diff --git a/package.xml b/package.xml
index 2dad08b..9865537 100644
--- a/package.xml
+++ b/package.xml
@@ -14,13 +14,11 @@
- 1.3
- 2006-11-06
+ 1.3.1
+ 2007-05-04
BSD, revised
stable
- PHP 5.2 compatibility
-gnupg_deletekey now allows deleting a secret key in procedural usage
-raised min version to 4.4
+ fixed double-free with recent gpgme-lib
@@ -62,6 +60,13 @@ raised min version to 4.4
+
+ 1.3.1
+ 2007-05-04
+ BSD, revised
+ stable
+ fixed double-free with recent gpgme-lib
+
1.3
2006-11-06
diff --git a/package2.xml b/package2.xml
index bb555f3..ec35b86 100644
--- a/package2.xml
+++ b/package2.xml
@@ -1,5 +1,5 @@
-
@@ -15,20 +15,18 @@ http://pear.php.net/dtd/package-2.0.xsd">
traufeisen@php.net
yes
- 2006-11-06
-
+ 2007-05-04
+
- 1.3
- 1.3
+ 1.3.1
+ 1.3.1
stable
stable
BSD, revised
- PHP 5.2 compatibility
-gnupg_deletekey now allows deleting a secret key in procedural usage
-raised min version to 4.4
+ fixed double-free with recent gpgme-lib
@@ -81,6 +79,20 @@ raised min version to 4.4
gnupg
+
+
+ 1.3.1
+ 1.3.1
+
+
+ stable
+ stable
+
+ 2007-05-04
+ BSD, revised
+ fixed double-free with recent gpgme-lib
+
+
1.3
diff --git a/tests/gnupg_oo_keyinfo.phpt b/tests/gnupg_oo_keyinfo.phpt
index a2e4265..9beb553 100644
--- a/tests/gnupg_oo_keyinfo.phpt
+++ b/tests/gnupg_oo_keyinfo.phpt
@@ -72,7 +72,9 @@ array(1) {
bool(false)
}
[1]=>
- array(10) {
+ array(11) {
+ ["fingerprint"]=>
+ string(40) "A3437D3651E27CF9864198F0BFE8D07DDACDEAC8"
["keyid"]=>
string(16) "BFE8D07DDACDEAC8"
["timestamp"]=>
diff --git a/tests/gnupg_res_keyinfo.phpt b/tests/gnupg_res_keyinfo.phpt
index 5fc4020..7decec3 100644
--- a/tests/gnupg_res_keyinfo.phpt
+++ b/tests/gnupg_res_keyinfo.phpt
@@ -70,7 +70,9 @@ array(1) {
bool(false)
}
[1]=>
- array(10) {
+ array(11) {
+ ["fingerprint"]=>
+ string(40) "A3437D3651E27CF9864198F0BFE8D07DDACDEAC8"
["keyid"]=>
string(16) "BFE8D07DDACDEAC8"
["timestamp"]=>