[php-maint] Bug#331001: marked as done (php5-gd: error in gd/gd.c : bad variable sizes for parse (cause data squish on 64 bits machines))

Debian Bug Tracking System owner at bugs.debian.org
Sat Oct 8 17:18:14 UTC 2005


Your message dated Sat, 08 Oct 2005 10:02:16 -0700
with message-id <E1EOI5Q-0005BS-00 at spohr.debian.org>
and subject line Bug#331001: fixed in php5 5.0.5-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 1 Oct 2005 00:22:34 +0000
>From madcoder at debian.org Fri Sep 30 17:22:34 2005
Return-path: <madcoder at debian.org>
Received: from smtp2-g19.free.fr [212.27.42.28] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1ELV97-0006vn-00; Fri, 30 Sep 2005 17:22:34 -0700
Received: from hermes.madism.org (olympe.madism.org [82.225.205.10])
	by smtp2-g19.free.fr (Postfix) with ESMTP id B8D1625C27;
	Sat,  1 Oct 2005 02:22:32 +0200 (CEST)
Received: from hermes.madism.org (localhost [127.0.0.1])
	by hermes.madism.org (Postfix) with ESMTP id 24CC1BC79B;
	Sat,  1 Oct 2005 02:22:32 +0200 (CEST)
Received: from hades.madism.org (hades.madism.org [192.168.0.10])
	by hermes.madism.org (Postfix) with ESMTP id 0BD57BC79A;
	Sat,  1 Oct 2005 02:22:31 +0200 (CEST)
Received: by hades.madism.org (Postfix, from userid 1000)
	id AF4F162113; Sat,  1 Oct 2005 02:22:39 +0200 (CEST)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Pierre Habouzit <madcoder at debian.org>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: php5-gd: error in gd/gd.c : bad variable sizes for parse (cause data squish
 on 64 bits machines)
X-Mailer: reportbug 3.17
Date: Sat, 01 Oct 2005 02:22:39 +0200
Message-Id: <20051001002239.AF4F162113 at hades.madism.org>
X-Virus-Scanned: by ClamAV (using ClamSMTP) at hermes.madism.org
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Package: php5-gd
Version: 5.0.5-1
Severity: important
Tags: patch


  imagettftext is broken in php5-gd, but not in php4-gd on 64 machines
(amd64 here, but any machine where sizeof(long) != sizeof(int) is
affected).

  running a diff between two version shows that interesting part in
ext/gd/gd.c :


@@ -3017,8 +3109,7 @@ static void php_imagettftext_common(INTE
 {
        zval *IM, *EXT = NULL;
        gdImagePtr im=NULL;
-       long col = -1, x = -1, y = -1;
-       int str_len, fontname_len, i, brect[8];
+       int col = -1, x = -1, y = -1, str_len, fontname_len, i,
	brect[8];
        double ptsize, angle;
        unsigned char *str = NULL, *fontname = NULL;
        char *error = NULL;



and a bit after, you have a zend parse :

        } else if (zend_parse_parameters(argc TSRMLS_CC, "rddlllss|a", &IM, &ptsize, &angle, &x, &y, &col, &fontname, &fontname_len, &str, &str_len, &EXT) == FAILURE) {


prototype for variables x, y, col is clearly the 'lll' part, meaning that x, y and col have to be longs, not ints.


this particular change has to be reverted since it breaks GD. On 64 bits machines, you have to run :

ImageTTFText($img, $font, $angle, $whatever_you_want, $x << 32 | $y, ...) to make it work ;p
problem is, ImageTTFText is quite important for GD, and having it broken, is painful.




Cheers,


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12
Locale: LANG=fr_FR at euro, LC_CTYPE=fr_FR at euro (charmap=ISO-8859-15)

Versions of packages php5-gd depends on:
ii  debconf [debconf-2.0]     1.4.58         Debian configuration management sy
ii  libapache2-mod-php5 [phpa 5.0.5-1        server-side, HTML-embedded scripti
ii  libc6                     2.3.5-6        GNU C Library: Shared libraries an
ii  libfreetype6              2.1.10-1       FreeType 2 font engine, shared lib
ii  libgd2-xpm                2.0.33-2       GD Graphics Library version 2
ii  libjpeg62                 6b-10          The Independent JPEG Group's JPEG 
ii  libpng12-0                1.2.8rel-4     PNG library - runtime
ii  libt1-5                   5.1.0-2        Type 1 font rasterizer library - r
ii  libx11-6                  6.8.2.dfsg.1-7 X Window System protocol client li
ii  libxpm4                   6.8.2.dfsg.1-7 X pixmap library
pi  php5-cli [phpapi-20041030 5.0.5-1        command-line interpreter for the p
ii  php5-common               5.0.5-1        Common files for packages built fr
ii  xlibs                     6.8.2.dfsg.1-7 X Window System client libraries m
ii  zlib1g                    1:1.2.3-4      compression library - runtime

php5-gd recommends no packages.

-- debconf information:
  php5/remove_extension: true
  php5/extension_gd_apache2: true
  php5/add_extension: true
  php5/extension_gd_cli: true
  php5/extension_gd_cgi: true

---------------------------------------
Received: (at 331001-close) by bugs.debian.org; 8 Oct 2005 17:12:07 +0000
>From katie at spohr.debian.org Sat Oct 08 10:12:06 2005
Return-path: <katie at spohr.debian.org>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
	id 1EOI5Q-0005BS-00; Sat, 08 Oct 2005 10:02:16 -0700
From: Adam Conrad <adconrad at 0c3.net>
To: 331001-close at bugs.debian.org
X-Katie: $Revision: 1.56 $
Subject: Bug#331001: fixed in php5 5.0.5-2
Message-Id: <E1EOI5Q-0005BS-00 at spohr.debian.org>
Sender: Archive Administrator <katie at spohr.debian.org>
Date: Sat, 08 Oct 2005 10:02:16 -0700
Delivered-To: 331001-close at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 3

Source: php5
Source-Version: 5.0.5-2

We believe that the bug you reported is fixed in the latest version of
php5, which is due to be installed in the Debian FTP archive:

libapache-mod-php5_5.0.5-2_i386.deb
  to pool/main/p/php5/libapache-mod-php5_5.0.5-2_i386.deb
libapache2-mod-php5_5.0.5-2_i386.deb
  to pool/main/p/php5/libapache2-mod-php5_5.0.5-2_i386.deb
php-pear_5.0.5-2_all.deb
  to pool/main/p/php5/php-pear_5.0.5-2_all.deb
php5-cgi_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-cgi_5.0.5-2_i386.deb
php5-cli_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-cli_5.0.5-2_i386.deb
php5-common_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-common_5.0.5-2_i386.deb
php5-curl_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-curl_5.0.5-2_i386.deb
php5-dev_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-dev_5.0.5-2_i386.deb
php5-gd_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-gd_5.0.5-2_i386.deb
php5-ldap_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-ldap_5.0.5-2_i386.deb
php5-mhash_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-mhash_5.0.5-2_i386.deb
php5-mysql_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-mysql_5.0.5-2_i386.deb
php5-odbc_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-odbc_5.0.5-2_i386.deb
php5-pgsql_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-pgsql_5.0.5-2_i386.deb
php5-recode_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-recode_5.0.5-2_i386.deb
php5-snmp_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-snmp_5.0.5-2_i386.deb
php5-sqlite_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-sqlite_5.0.5-2_i386.deb
php5-sybase_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-sybase_5.0.5-2_i386.deb
php5-xmlrpc_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-xmlrpc_5.0.5-2_i386.deb
php5-xsl_5.0.5-2_i386.deb
  to pool/main/p/php5/php5-xsl_5.0.5-2_i386.deb
php5_5.0.5-2.diff.gz
  to pool/main/p/php5/php5_5.0.5-2.diff.gz
php5_5.0.5-2.dsc
  to pool/main/p/php5/php5_5.0.5-2.dsc
php5_5.0.5-2_all.deb
  to pool/main/p/php5/php5_5.0.5-2_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 331001 at bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Adam Conrad <adconrad at 0c3.net> (supplier of updated php5 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster at debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 27 Sep 2005 16:09:29 +1000
Source: php5
Binary: php5-gd php5-ldap php5 php5-xmlrpc libapache2-mod-php5 php5-xsl php5-cgi php-pear php5-pgsql php5-cli php5-recode php5-mhash php5-sybase php5-curl php5-odbc php5-mysql php5-common php5-snmp php5-dev php5-sqlite libapache-mod-php5
Architecture: source i386 all
Version: 5.0.5-2
Distribution: unstable
Urgency: medium
Maintainer: Debian PHP Maintainers <pkg-php-maint at lists.alioth.debian.org>
Changed-By: Adam Conrad <adconrad at 0c3.net>
Description: 
 libapache-mod-php5 - server-side, HTML-embedded scripting language (apache 1.3 module)
 libapache2-mod-php5 - server-side, HTML-embedded scripting language (apache 2.0 module)
 php-pear   - PEAR - PHP Extension and Application Repository
 php5       - server-side, HTML-embedded scripting language (meta-package)
 php5-cgi   - server-side, HTML-embedded scripting language (CGI binary)
 php5-cli   - command-line interpreter for the php5 scripting language
 php5-common - Common files for packages built from the php5 source
 php5-curl  - CURL module for php5
 php5-dev   - Files for PHP5 module development
 php5-gd    - GD module for php5
 php5-ldap  - LDAP module for php5
 php5-mhash - MHASH module for php5
 php5-mysql - MySQL module for php5
 php5-odbc  - ODBC module for php5
 php5-pgsql - PostgreSQL module for php5
 php5-recode - recode module for php5
 php5-snmp  - SNMP module for php5
 php5-sqlite - SQLite module for php5
 php5-sybase - Sybase / MS SQL Server module for php5
 php5-xmlrpc - XML-RPC module for php5
 php5-xsl   - XSL module for php5
Closes: 329768 331001 332393
Changes: 
 php5 (5.0.5-2) unstable; urgency=medium
 .
   * Remove Andres Salomon from the Uploaders field, at his request.  Thanks
     for all your work on the PHP packages, Andres, now fix our kernel bugs.
   * Add 054-open_basedir_slash.patch, which fixes a bug where if open_basedir
     is set to "/foo/", users can access files in "/foobar/", which is not the
     documented behaviour; this addresses CAN-2005-3054 (see: #323585)
   * Add 104-64_bit_serialize.patch from Joe Orton, resolving a segfault when
     serializing objects on all 64-bit architectures (closes: #329768)
   * Add 105-64_bit_imagettftext.patch, fixing a type mismatch in the GD
     extension, causing memory corruption on 64-bit arches (closes: #331001)
   * Add 055-gd_safe_mode_checks.patch from PHP CVS, adding missing safe_mode
     checks to the _php_image_output and _php_image_output_ctx GD functions.
   * Make php-pear Provide, Replace, and Conflict php-html-template-it, which
     we appear to have absorbed into the main PEAR packaging (closes: #332393)
Files: 
 6481e3dc48ce8b2302c4cb7324539160 1732 web optional php5_5.0.5-2.dsc
 eb83ff6cff2afa3c54df31e80ce5df3e 96006 web optional php5_5.0.5-2.diff.gz
 52d763b646a77ffd92bfb78f75710a57 126980 web optional php5-common_5.0.5-2_i386.deb
 de6f7a7eebf7ad4bd3a85b02443b4573 1886780 web optional libapache-mod-php5_5.0.5-2_i386.deb
 756c7641b48b0186c8e1ab1fafa7a47e 1887682 web optional libapache2-mod-php5_5.0.5-2_i386.deb
 e70b190d56eb71d4024fa4836eb30feb 3750664 web optional php5-cgi_5.0.5-2_i386.deb
 7ac45807b442107a5af3f6f4aedb261c 1884054 web optional php5-cli_5.0.5-2_i386.deb
 97a2bd69ee62aca7fa6f0c17e1a5669f 218738 devel optional php5-dev_5.0.5-2_i386.deb
 75749ee4a33e148d02fec20c583f53b3 22194 web optional php5-curl_5.0.5-2_i386.deb
 ed4efee07789c865882fbb2ee7bf4339 33148 web optional php5-gd_5.0.5-2_i386.deb
 6899a43a40b8959514d85009a840004a 19248 web optional php5-ldap_5.0.5-2_i386.deb
 fa2ea226d3cf1003334aea7b96001d99 8338 web optional php5-mhash_5.0.5-2_i386.deb
 c4a828e9af6a86a60f285431ea8f5bf4 22062 web optional php5-mysql_5.0.5-2_i386.deb
 2ac8d521067b3dd2a2751b750af6ed05 27662 web optional php5-odbc_5.0.5-2_i386.deb
 19b954ba07a24b8980641bdaec0591b1 36938 web optional php5-pgsql_5.0.5-2_i386.deb
 874fe23d2d4904801c2fcaa5b5b5b9f7 7954 web optional php5-recode_5.0.5-2_i386.deb
 a8caba7cb9e6053d6f7eea97f1756a22 14090 web optional php5-snmp_5.0.5-2_i386.deb
 4367736bc63cee6c073d05965030bf46 24820 web optional php5-sqlite_5.0.5-2_i386.deb
 3bade307c6f5b9f4b5a5ae31dd66dbb3 20900 web optional php5-sybase_5.0.5-2_i386.deb
 38c80039ac2af2555a7aeb2e59093427 38332 web optional php5-xmlrpc_5.0.5-2_i386.deb
 43700325ab35018e7eaa1bd89f479954 14230 web optional php5-xsl_5.0.5-2_i386.deb
 ff3391a4845afea944cc580f90ef4b93 1034 web optional php5_5.0.5-2_all.deb
 9600c6ecde57dcd4623e247942cd9e1c 173758 web optional php-pear_5.0.5-2_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDR/a5vjztR8bOoMkRAnrBAKCKzxTo5tR/uax3KrfH+7SOGuLUzwCgrLZv
51oRMf79Te/8ETxIFhd5oDc=
=8LKh
-----END PGP SIGNATURE-----




More information about the pkg-php-maint mailing list