projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
don't create persistent easy handles for non-persistent multi handles
[m6w6/ext-http]
/
php_http_params.c
diff --git
a/php_http_params.c
b/php_http_params.c
index 092db0525e8ffa2e4e1b87033823d71da4fbc647..ce785ecbe03efef1daad18b9acb0948fc5f9a61a 100644
(file)
--- a/
php_http_params.c
+++ b/
php_http_params.c
@@
-224,6
+224,10
@@
static inline void sanitize_key(unsigned flags, char *str, size_t len, zval *zv,
if (flags & PHP_HTTP_PARAMS_ESCAPED) {
sanitize_escaped(zv TSRMLS_CC);
}
if (flags & PHP_HTTP_PARAMS_ESCAPED) {
sanitize_escaped(zv TSRMLS_CC);
}
+
+ if (!Z_STRLEN_P(zv)) {
+ return;
+ }
eos = &Z_STRVAL_P(zv)[Z_STRLEN_P(zv)-1];
if (*eos == '*') {
eos = &Z_STRVAL_P(zv)[Z_STRLEN_P(zv)-1];
if (*eos == '*') {
@@
-343,7
+347,7
@@
static inline void sanitize_value(unsigned flags, char *str, size_t len, zval *z
ZVAL_COPY_VALUE(tmp, zv);
array_init(zv);
add_assoc_zval(zv, language, tmp);
ZVAL_COPY_VALUE(tmp, zv);
array_init(zv);
add_assoc_zval(zv, language, tmp);
-
S
TR_FREE(language);
+
P
TR_FREE(language);
}
}
}
}
@@
-881,7
+885,7
@@
void php_http_params_separator_free(php_http_params_token_t **separator)
php_http_params_token_t **sep = separator;
if (sep) {
while (*sep) {
php_http_params_token_t **sep = separator;
if (sep) {
while (*sep) {
-
S
TR_FREE((*sep)->str);
+
P
TR_FREE((*sep)->str);
efree(*sep);
++sep;
}
efree(*sep);
++sep;
}