#39165 [Opn->Asn]: Segmentation fault in ext/ming when adding text without setting size before

From: Date: Mon, 16 Oct 2006 13:05:51 +0000
Subject: #39165 [Opn->Asn]: Segmentation fault in ext/ming when adding text without setting size before
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103587@lists.php.net to get a copy of this message
ID: 39165 Updated by: tony2001@php.net Reported By: kore@php.net -Status: Open +Status: Assigned -Bug Type: Reproducible crash +Bug Type: Ming related Operating System: Linux 2.6.18 PHP Version: 5.2.0RC5 -Assigned To: +Assigned To: fmk Previous Comments: ------------------------------------------------------------------------ [2006-10-16 12:13:38] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39165&edit=1

« previous php.bugs (#103587) next »