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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: benh at advanceclaims dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Dec 22 02:01:28 2024 UTC