#45194 [NEW]: A string of unbroken characters wider than width will cause segfault
From: benh at advanceclaims dot com
Operating system: Linux
PHP version: 4.4.8
PHP Bug Type: PDF related
Bug description: A string of unbroken characters wider than width will cause segfault
Description:
------------
pdf_show_boxed() normally wraps lines between words. If a string
containing unbroken characters is fed to pdf_show_boxed() such that the
unbroken characters render to a width wider than the width value supplied
to pdf_show_boxed() it will cause a seg fault because it does not know
where/how to wrap the lines.
I do realise that pdf_show_boxed() is deprecated and that the problem is
almost certain to be with the underlying library.
Reproduce code:
---------------
$string="A string with a lot of unbroken characters
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ";
pdf_show_boxed($pdf,$string,$lmargin,$bottom_margin,$width,$height,"left","");
Expected result:
----------------
I would expect pdf_show_boxed to break the string like so:
A string with a lot of unbroken characters
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
Actual result:
--------------
Segmentation fault
--
Edit bug report at http://bugs.php.net/?id=45194&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45194&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45194&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45194&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45194&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45194&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45194&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45194&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45194&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45194&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45194&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45194&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45194&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45194&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45194&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45194&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45194&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45194&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45194&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45194&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45194&r=mysqlcfg
Thread (2 messages)
- benh at advanceclaims dot com