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 092db0525e8ffa2e4e1b87033823d71da4fbc647..523424423d3b21ce15704d4804cae4dd73fc1daa 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 == '*') {