]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6'
authorStanislav Malyshev <stas@php.net>
Mon, 28 Sep 2015 20:05:02 +0000 (13:05 -0700)
committerStanislav Malyshev <stas@php.net>
Mon, 28 Sep 2015 20:05:02 +0000 (13:05 -0700)
* PHP-5.6:
  Fix bug #70480 (php_url_parse_ex() buffer overflow read)

1  2 
ext/standard/url.c

index 1c9e9a6e4c659a2a6d4952759857fb426d7c865d,28ccba0c8173719f3bb0cec0305d3ad8b86993fb..8609e11e0e5da21a6a568fb1568a058db91234b6
@@@ -314,13 -314,13 +314,13 @@@ PHPAPI php_url *php_url_parse_ex(char c
        if (e == ue) {
                return ret;
        }
 -      
 +
        s = e;
 -      
 +
        nohost:
 -      
 +
        if ((p = memchr(s, '?', (ue - s)))) {
-               pp = strchr(s, '#');
+               pp = memchr(s, '#', (ue - s));
  
                if (pp && pp < p) {
                        if (pp - s) {