fix invalid read
authorMichael Wallner <mike@php.net>
Tue, 19 Aug 2014 18:35:20 +0000 (20:35 +0200)
committerMichael Wallner <mike@php.net>
Tue, 19 Aug 2014 18:35:20 +0000 (20:35 +0200)
php_http_params.c

index 092db05..5234244 100644 (file)
@@ -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 == '*') {