iliaa Sun Feb 4 17:02:01 2007 UTC
Modified files:
/php-src/ext/standard http.c
Log:
Added a double free check.
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/http.c?r1=1.26&r2=1.27&diff_format=u
Index: php-src/ext/standard/http.c
diff -u php-src/ext/standard/http.c:1.26 php-src/ext/standard/http.c:1.27
--- php-src/ext/standard/http.c:1.26 Wed Jan 3 23:17:17 2007
+++ php-src/ext/standard/http.c Sun Feb 4 17:02:01 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: http.c,v 1.26 2007/01/03 23:17:17 iliaa Exp $ */
+/* $Id: http.c,v 1.27 2007/02/04 17:02:01 iliaa Exp $ */
#include "php_http.h"
#include "php_ini.h"
@@ -184,8 +184,13 @@
char *temp;
int temp_len;
zend_unicode_to_string(UG(utf8_conv),
&temp, &temp_len, Z_USTRVAL_PP(zdata), Z_USTRLEN_PP(zdata) TSRMLS_CC);
- ekey = php_url_encode(temp, temp_len,
&ekey_len);
- efree(temp);
+ if (temp) {
+ ekey = php_url_encode(temp,
temp_len, &ekey_len);
+ efree(temp);
+ } else {
+ smart_str_free(formstr);
+ return FAILURE;
+ }
break;
}
case IS_STRING:
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php