SegFault when Collator not constructed properly
| Bug #60192 | SegFault when Collator not constructed properly | ||||
|---|---|---|---|---|---|
| Submitted: | 2011-11-01 15:28 UTC | Modified: | 2011-11-02 07:37 UTC | ||
| From: | rodney dot rehm at medialize dot de | Assigned: | fa (profile) | ||
| Status: | Closed | Package: | intl (PECL) | ||
| PHP Version: | 5.3.8 | OS: | Mac OS X 10.7.2 | ||
| Private report: | No | CVE-ID: | None | ||
[2011-11-01 15:28 UTC] rodney dot rehm at medialize dot de
Description:
------------
If Collator is extended, but parent::__construct() not invoked, any call to sort() will end in a segmentation fault.
Test script:
---------------
<?php
class Collator2 extends Collator {
public function __construct() {
// ommitting parent::__construct($someLocale);
}
}
$c = new Collator2();
$a = array('a', 'b');
$c->sort($a);
Expected result:
----------------
Some kind of Exception, E_ERROR or something. Anything but a SegFault.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2011-11-02 06:38 UTC] fa@php.net
-Assigned To: +Assigned To: fa
[2011-11-02 07:37 UTC] fa@php.net
-Status: Assigned +Status: Closed
[2011-11-02 07:37 UTC] fa@php.net