Grokbase Groups PHP php-cvs May 2016
FAQ
Commit: ad98f573f6e0ad4f83db906e5b1cfd1faf6b4023
Author: Lauri Kenttä <lauri.kentta@gmail.com> Tue, 24 May 2016 17:33:44 +0300
Parents: 26fa27d760c7b119805ba6d9db624f479d9b9fc8
Branches: master

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

Log:
Test for bug #72221, segfault in zend_memnstr_ex

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

Changed paths:
   A Zend/tests/bug72221.phpt


Diff:
diff --git a/Zend/tests/bug72221.phpt b/Zend/tests/bug72221.phpt
new file mode 100644
index 0000000..8f30099
--- /dev/null
+++ b/Zend/tests/bug72221.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #72221 (Segmentation fault in stream_get_line / zend_memnstr_ex)
+--FILE--
+<?php
+$fp = fopen("php://memory", "r+");
+fwrite($fp, str_repeat("baad", 1024*1024));
+rewind($fp);
+stream_get_line($fp, 1024*1024*2, "aaaa");
+echo "Done\n";
+--EXPECT--
+Done

Search Discussions

  • Xinchen Hui at May 28, 2016 at 8:12 am
    Commit: 58302192b79440bf8049dd72ebe1953990bb19bb
    Author: Lauri Kenttä <lauri.kentta@gmail.com> Tue, 24 May 2016 17:33:44 +0300
    Committer: Xinchen Hui <laruence@gmail.com> Sat, 28 May 2016 16:10:29 +0800
    Parents: 287f9489d840f0e2c192c8db9fe69f7b03bb8af5
    Branches: PHP-7.0 master

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

    Log:
    Test for bug #72221, segfault in zend_memnstr_ex

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

    Changed paths:
       A Zend/tests/bug72221.phpt


    Diff:
    diff --git a/Zend/tests/bug72221.phpt b/Zend/tests/bug72221.phpt
    new file mode 100644
    index 0000000..8f30099
    --- /dev/null
    +++ b/Zend/tests/bug72221.phpt
    @@ -0,0 +1,11 @@
    +--TEST--
    +Bug #72221 (Segmentation fault in stream_get_line / zend_memnstr_ex)
    +--FILE--
    +<?php
    +$fp = fopen("php://memory", "r+");
    +fwrite($fp, str_repeat("baad", 1024*1024));
    +rewind($fp);
    +stream_get_line($fp, 1024*1024*2, "aaaa");
    +echo "Done\n";
    +--EXPECT--
    +Done

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