php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45194 A string of unbroken characters wider than width will cause segfault
Submitted: 2008-06-06 16:58 UTC Modified: 2008-06-06 18:12 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: benh at advanceclaims dot com Assigned:
Status: Wont fix Package: PDF related
PHP Version: 4.4.8 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
1 + 44 = ?
Subscribe to this entry?

 
 [2008-06-06 16:58 UTC] benh at advanceclaims dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-06 18:12 UTC] scottmac@php.net
We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6
ready.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 07:01:29 2024 UTC