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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: skettler@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 15 17:01:28 2024 UTC