[php-maint] Bug#768309: php5-odbc: odbc_exec runs out of memory with Sybase ADS ODBC driver

Frédéric Marchal frederic.marchal at wowtechnology.com
Thu Nov 6 11:33:08 UTC 2014

Package: php5-odbc
Version: 5.4.34-0+deb7u1
Severity: important
Tags: upstream patch

Dear Maintainer,

After upgrading to php 5.4.34, a script running a query on a Sybase ADS
server using the libadsodbc driver from Sybase fails with errors like

PHP Fatal error:  Out of memory (allocated 524288) (tried to allocate
12415340535808218625 bytes) in SybaseClass.php on line 127

The error occurs on a line running odbc_exec().

It is produced because, now, php queries the returned column length
using the SQL_DESC_OCTET_LENGTH attribute which is not supported by the
underlying ODBC driver. As php doesn't check the return code, it tries
to use the uninitialized size to allocate the memory.

I already reported this bug upstream with a patch:


-- System Information:
Debian Release: 7.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-0.bpo.2-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages php5-odbc depends on:
ii  dpkg                                   1.16.15
ii  libapache2-mod-php5 [phpapi-20100525]  5.4.34-0+deb7u1
ii  libc6                                  2.13-38+deb7u6
ii  libodbc1                               2.2.14p2-5
ii  php5-cgi [phpapi-20100525]             5.4.34-0+deb7u1
ii  php5-cli [phpapi-20100525]             5.4.34-0+deb7u1
ii  php5-common                            5.4.34-0+deb7u1
ii  ucf                                    3.0025+nmu3
ii  unixodbc                               2.2.14p2-5

php5-odbc recommends no packages.

php5-odbc suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adsodbc.patch
Type: text/x-diff
Size: 889 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20141106/13789fef/attachment.patch>

More information about the pkg-php-maint mailing list