php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49869 imagettfbbox returns bogus value
Submitted: 2009-10-13 18:41 UTC Modified: 2010-07-31 10:53 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: orel at melix dot net Assigned: tabe (profile)
Status: Duplicate Package: GD related
PHP Version: 5.2.11 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: orel at melix dot net
New email:
PHP Version: OS:

 

 [2009-10-13 18:41 UTC] orel at melix dot net
Description:
------------
imagettfbbox returns bogus values:
Array
(
    [0] => 0
    [1] => 3
    [2] => -2147483648
    [3] => 3
    [4] => -2147483648
    [5] => -14
    [6] => 0
    [7] => -14
)

5.2.0-8+etch13 is ok
5.2.11-1 is ko

Reproduce code:
---------------
print_r(imagettfbbox(12, 0,"/home/somewhere/verdanab.ttf", "Recipient responses"));


Expected result:
----------------
Array
(
    [0] => 0
    [1] => 3
    [2] => 181
    [3] => 3
    [4] => 181
    [5] => -14
    [6] => 0
    [7] => -14
)


Actual result:
--------------
Array
(
    [0] => 0
    [1] => 3
    [2] => -2147483648
    [3] => 3
    [4] => -2147483648
    [5] => -14
    [6] => 0
    [7] => -14
)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-13 18:56 UTC] pajoye@php.net
Hm that one is new, time to look at it Tabe?
 [2009-10-29 03:30 UTC] tabe@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

It looks ok with PHP_5_3:
Array
(
    [0] => -1
    [1] => 3
    [2] => 173
    [3] => 3
    [4] => 173
    [5] => -14
    [6] => -1
    [7] => -14
)

 [2009-11-04 15:05 UTC] orel at melix dot net
It is ok with PHP 5.3.2-dev
with this configure line
./configure  --with-gd --enable-gd-native-ttf  --with-freetype-dir

Result is
Array
(
    [0] => -1
    [1] => 3
    [2] => 173
    [3] => 3
    [4] => 173
    [5] => -14
    [6] => -1
    [7] => -14
)
 [2010-01-18 09:36 UTC] tabe@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2010-01-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-03-19 23:25 UTC] administrateur at exinsidephp dot com
See http://bugs.php.net/bug.php?id=51315

Problem isn't resolved.
Tested width the last snapshot (PHP 5.3.2)
 [2010-06-22 00:36 UTC] felipe@php.net
-Status: No Feedback +Status: Assigned
 [2010-07-31 04:02 UTC] ken at smallboxcms dot com
Got tired of being stuck at 5.2.9 while waiting for a fix for this bug. Compiled PHP against the standard (non bundled) version of GD and all is well. Using GD rpm version gd-devel-2.0.33
 [2010-07-31 10:53 UTC] pajoye@php.net
-Status: Assigned +Status: Duplicate
 [2010-07-31 10:53 UTC] pajoye@php.net
duplicate #51315
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 14:01:28 2025 UTC