Grokbase Groups PHP php-cvs May 2016
FAQ
Commit: 287f9489d840f0e2c192c8db9fe69f7b03bb8af5
Author: Lauri Kenttä <lauri.kentta@gmail.com> Sat, 21 May 2016 18:46:00 +0300
Committer: Xinchen Hui <laruence@gmail.com> Sat, 28 May 2016 16:10:16 +0800
Parents: cc0d23766481086cb2ff7cf605201db18775b79b
Branches: PHP-7.0 master

Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=287f9489d840f0e2c192c8db9fe69f7b03bb8af5

Log:
Fix bug #72221 (segfault, past-the-end access)

Bugs:
https://bugs.php.net/72221

Changed paths:
   M Zend/zend_operators.c


Diff:
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 50557e5..a02551b 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -2927,6 +2927,9 @@ ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const c
    if (i == needle_len) {
     return p;
    }
+ if (UNEXPECTED(p == end)) {
+ return NULL;
+ }
    p += td[(unsigned char)(p[needle_len])];
   }

Search Discussions

  • Xinchen Hui at May 28, 2016 at 8:12 am
    Commit: 26fa27d760c7b119805ba6d9db624f479d9b9fc8
    Author: Lauri Kenttä <lauri.kentta@gmail.com> Sat, 21 May 2016 18:46:00 +0300
    Parents: 4f077aee836ad7d8335cf62629a8364bdf939db9
    Branches: master

    Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=26fa27d760c7b119805ba6d9db624f479d9b9fc8

    Log:
    Fix bug #72221 (segfault, past-the-end access)

    Bugs:
    https://bugs.php.net/72221

    Changed paths:
       M Zend/zend_operators.c


    Diff:
    diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
    index f47a148..8eb9a7b 100644
    --- a/Zend/zend_operators.c
    +++ b/Zend/zend_operators.c
    @@ -2965,6 +2965,9 @@ ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const c
        if (i == needle_len) {
         return p;
        }
    + if (UNEXPECTED(p == end)) {
    + return NULL;
    + }
        p += td[(unsigned char)(p[needle_len])];
       }

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-cvs @
categoriesphp
postedMay 28, '16 at 8:12a
activeMay 28, '16 at 8:12a
posts2
users1
websitephp.net

1 user in discussion

Xinchen Hui: 2 posts

People

Translate

site design / logo © 2019 Grokbase