From:
Operating system: openSUSE 11.3 (devel)
PHP version: 5.3.2
Package: PDO related
Bug Type: Bug
Bug description:Buffer overflows in pdc_odbc driver
Description:
------------
While building with gcc 4.5 the followin 'warnings' can be observed in the
build log:
1)
In function 'strcpy',
inlined from 'odbc_handle_set_attr' at
/usr/src/packages/BUILD/php-5.3.0/ext/pdo_odbc/odbc_driver.c:349:10:
/usr/include/bits/string3.h:107:3: warning: call to __builtin___strcpy_chk
will always overflow destination buffer
/usr/src/packages/BUILD/php-5.3.0/ext/pdo_odbc/odbc_stmt.c: In function
'odbc_stmt_param_hook':
2)
In function 'strcpy',
inlined from 'odbc_stmt_get_attr' at
/usr/src/packages/BUILD/php-5.3.0/ext/pdo_odbc/odbc_stmt.c:798:10:
/usr/include/bits/string3.h:107:3: warning: call to __builtin___strcpy_chk
will always overflow destination buffer
In function 'strcpy',
inlined from 'odbc_stmt_set_param' at
/usr/src/packages/BUILD/php-5.3.0/ext/pdo_odbc/odbc_stmt.c:766:10:
/usr/include/bits/string3.h:107:3: warning: call to __builtin___strcpy_chk
will always overflow destination buffer
nation buffer
Test script:
---------------
regular build using gcc 4.5 reveals it.
Expected result:
----------------
No buffer overflow warnings
--
Edit bug report at http://bugs.php.net/bug.php?id=51224&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51224&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51224&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51224&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51224&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51224&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51224&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51224&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51224&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51224&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51224&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51224&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51224&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51224&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51224&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51224&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51224&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51224&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51224&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51224&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51224&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51224&r=mysqlcfg