From: Michael Wallner Date: Tue, 19 Aug 2014 18:35:20 +0000 (+0200) Subject: fix invalid read X-Git-Tag: RELEASE_2_1_0~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=2b065af121eb367bd3fe7e5ad3c673d342438d34;p=m6w6%2Fext-http fix invalid read --- diff --git a/php_http_params.c b/php_http_params.c index 092db05..5234244 100644 --- 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 (!Z_STRLEN_P(zv)) { + return; + } eos = &Z_STRVAL_P(zv)[Z_STRLEN_P(zv)-1]; if (*eos == '*') {