php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39165 Segmentation fault in ext/ming when adding text without setting size before
Submitted: 2006-10-16 12:13 UTC Modified: 2006-10-16 21:15 UTC
From: kore@php.net Assigned: fmk (profile)
Status: Not a bug Package: Ming related
PHP Version: 5.2.0RC5 OS: Linux 2.6.18
Private report: No CVE-ID: None
 [2006-10-16 12:13 UTC] kore@php.net
Description:
------------
Calling addString on a SWFText object without setting height or font before causes a segmentation fault in libming.so.

If only the height is set, the expected error occurs.

Backtrace:
(gdb) bt
#0  0xb7e124dc in SWFText_addWideString () from /usr/lib/libming.so.0
#1  0xb7e12678 in SWFText_addString () from /usr/lib/libming.so.0
#2  0x08189f23 in zim_swftext_addString (ht=1, return_value=0x875c140, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
    at /home/kore/bin/php/php-5.2-stable/php-src/ext/ming/ming.c:3541
... (Complete backtrace on request)

Tested with
PHP 5.1.6, ming 0.3
PHP 5.2-RC5 ming 0.3

Reproduce code:
---------------
<?php

$text = 'Teststring';
$size = 60;

$t = new SWFText();
//$t->setHeight( $size );
//$t->setFont( new SWFFont( 'fdb_font.fdb' ) );
$t->addString( $text );


Expected result:
----------------
Error message like this:
Catchable fatal error: SWFText::addString(): font must be set before calling addString in /home/kore/devel/ezcomponents/trunk/test.php on line 9

Actual result:
--------------
Segmentation fault.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-16 21:15 UTC] fmk@php.net
This is a problem in libming. I have a patch that should be included in the next version of libming.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 11 12:01:29 2024 UTC