|  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: 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]
Calling addString on a SWFText object without setting height or font before causes a segmentation fault in

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

(gdb) bt
#0  0xb7e124dc in SWFText_addWideString () from /usr/lib/
#1  0xb7e12678 in SWFText_addString () from /usr/lib/
#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:

$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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-16 21:15 UTC]
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: Mon Jul 15 20:01:29 2024 UTC