projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
7998a6d
)
fixed bug #17087 http_build_cookie() exhausts memory if cookie value is NULL
author
Michael Wallner
<mike@php.net>
Tue, 27 Apr 2010 13:42:32 +0000
(13:42 +0000)
committer
Michael Wallner
<mike@php.net>
Tue, 27 Apr 2010 13:42:32 +0000
(13:42 +0000)
http_cookie_api.c
patch
|
blob
|
history
package.xml
patch
|
blob
|
history
diff --git
a/http_cookie_api.c
b/http_cookie_api.c
index 081143dc2e16d438c64b84a73cd4642735dea276..5776b87caecd43d052efac87f3bb5e5b453a676a 100644
(file)
--- a/
http_cookie_api.c
+++ b/
http_cookie_api.c
@@
-323,7
+323,9
@@
PHP_HTTP_API void _http_cookie_list_tostring(http_cookie_list *list, char **str,
FOREACH_HASH_KEYVAL(pos, &list->cookies, key, val) {
if (key.type == HASH_KEY_IS_STRING && key.len) {
FOREACH_HASH_KEYVAL(pos, &list->cookies, key, val) {
if (key.type == HASH_KEY_IS_STRING && key.len) {
- append_encoded(&buf, key.str, key.len-1, Z_STRVAL_PP(val), Z_STRLEN_PP(val));
+ zval *tmp = http_zsep(IS_STRING, *val);
+ append_encoded(&buf, key.str, key.len-1, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp));
+ zval_ptr_dtor(&tmp);
}
}
}
}
@@
-341,7
+343,8
@@
PHP_HTTP_API void _http_cookie_list_tostring(http_cookie_list *list, char **str,
FOREACH_HASH_KEYVAL(pos, &list->extras, key, val) {
if (key.type == HASH_KEY_IS_STRING && key.len) {
FOREACH_HASH_KEYVAL(pos, &list->extras, key, val) {
if (key.type == HASH_KEY_IS_STRING && key.len) {
- append_encoded(&buf, key.str, key.len-1, Z_STRVAL_PP(val), Z_STRLEN_PP(val));
+ zval *tmp = http_zsep(IS_STRING, *val);
+ append_encoded(&buf, key.str, key.len-1, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp));
}
}
}
}
diff --git
a/package.xml
b/package.xml
index d43001f0bacc843ef5134a558a858d5a00917076..bb75602e214191ec6f7ecdc72c3f5fcf04c94c9f 100644
(file)
--- a/
package.xml
+++ b/
package.xml
@@
-28,13
+28,13
@@
support. Parallel requests are available for PHP 5 and greater.
<email>mike@php.net</email>
<active>yes</active>
</lead>
<email>mike@php.net</email>
<active>yes</active>
</lead>
- <date>20
09-12
-29</date>
+ <date>20
10-04
-29</date>
<version>
<version>
- <release>1.7.0
b2
</release>
+ <release>1.7.0</release>
<api>1.7.0</api>
</version>
<stability>
<api>1.7.0</api>
</version>
<stability>
- <release>
beta
</release>
+ <release>
stable
</release>
<api>stable</api>
</stability>
<license>BSD, revised</license>
<api>stable</api>
</stability>
<license>BSD, revised</license>
@@
-52,6
+52,7
@@
support. Parallel requests are available for PHP 5 and greater.
- HTTP_PROXY_HTTP_1_0
* Added request info members:
- condition_unmet (libcurl >= 7.19.4)
- HTTP_PROXY_HTTP_1_0
* Added request info members:
- condition_unmet (libcurl >= 7.19.4)
+* Fixed bug #17087 http_build_cookie() exhausts memory if cookie value is NULL
]]></notes>
<contents>
<dir name="/">
]]></notes>
<contents>
<dir name="/">