php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57739 Segmentation fault with invalid references
Submitted: 2007-07-11 12:04 UTC Modified: 2007-07-15 08:29 UTC
From: skettler@php.net Assigned: indeyets (profile)
Status: Closed Package: syck (PECL)
PHP Version: 5.2.1 OS: Debian/Linux Etch
Private report: No CVE-ID: None
 [2007-07-11 12:04 UTC] skettler@php.net
Description:
------------
If a YAML file contains a pointer to a non-existing reference, the PHP interpreter crashes with segmentation fault.

I'm using the Syck library version 0.55 from http://whytheluckystiff.net/syck/.

Reproduce code:
---------------
$yaml = <<<EOS
define: &pointer_to_define
   - 1
   - 2
   - 3
reference: *pointer_to_define
EOS;

print_r(syck_load($yaml));
print "\n";

$yaml = <<<EOS
define: &pointer_to_define
   - 1
   - 2
   - 3
reference: *broken_pointer_to_define
EOS;

print_r(syck_load($yaml));
print "\n";


Expected result:
----------------
Array
(
    [define] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

    [reference] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

)

Array
(
    [define] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

    [reference] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

)



Actual result:
--------------
Array
(
    [define] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

    [reference] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

)

Segmentation fault


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-11 12:10 UTC] indeyets at gmail dot com
confirmed.
looking at it

thanks :)
 [2007-07-15 08:29 UTC] indeyets at gmail dot com
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/syck


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:21 2019 UTC