[php-maint] Bug#594613: php5-odbc: segmentation fault with odbc_result which returns a null on 64bit result because of the patch #565387

Mayrand, Patrick Patrick.Mayrand at fadq.qc.ca
Fri Aug 27 17:48:40 UTC 2010


Subject: php5-odbc: segmentation fault with odbc_result which returns a null on 64bit result because of the patch #565387
Package: php5-odbc
Version: 5.2.6.dfsg.1-1+lenny9
Severity: important

Hi,

With this code:

<?
$reqSQL="select a.clinum, b.adrnum from dev.ga01p a left join dev.ga02p b on
a.clinum = b.clinum and b.adrnum = 4 where a.clinum = 7229";


$IDconnect=odbc_connect("test", "test", "test");

$test = odbc_exec($IDconnect,$reqSQL);
                 if ($test){
              echo "Query Executed";
                }else {
              echo "Query failed " .odbc_error();
            }

while(odbc_fetch_row($test)){
        $returnvalue = odbc_result($test, 2);
        echo 'test' . $returnvalue;
}
?>


odbc_result($test, 2) return a null. The script make a segmentation fault in apache and with php5 in command line. The script stop on the odbc_result.

If i get the source of php5 (apt-get source php5), i remove the patch odbc-64bits-len.patch and i build the package, i have no error and the script return my$

regards

-- System Information:
Debian Release: 5.0.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_CA, LC_CTYPE=fr_CA (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages php5-odbc depends on:
ii  libapache2-mod-php 5.2.6.dfsg.1-1+lenny9 server-side, HTML-embedded scripti
ii  libc6              2.7-18lenny4          GNU C Library: Shared libraries
ii  php5-cli [phpapi-2 5.2.6.dfsg.1-1+lenny9 command-line interpreter for the p
ii  php5-common        5.2.6.dfsg.1-1+lenny9 Common files for packages built fr
ii  unixodbc           2.2.11-16             ODBC tools libraries

php5-odbc recommends no packages.

php5-odbc suggests no packages.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20100827/b1a9e34b/attachment-0001.htm>


More information about the pkg-php-maint mailing list