Bug #68298 [NEW]: OCI int overflow

From: Date: Fri, 24 Oct 2014 10:43:57 +0000
Subject: Bug #68298 [NEW]: OCI int overflow
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188283@lists.php.net to get a copy of this message
From:             perrier dot p at gmail dot com
Operating system: Debian 7
PHP version:      5.6.2
Package:          OCI8 related
Bug Type:         Bug
Bug description:OCI int overflow

Description:
------------
If you have a NUMBER colonne which can store 64Bit int when you bind it,
it will be converted to INT32 ( ub4 )


in file oci8_statement.c function php_oci_bind_by_name


 case SQLT_INT:
 case SQLT_NUM:
		 if (Z_TYPE_P(var) == IS_RESOURCE || Z_TYPE_P(var) == IS_OBJECT) {
				 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid variable used
for bind");
				 return 1;
		 }
		 convert_to_long(var);
		 bind_data = (ub4 *)&Z_LVAL_P(var);
		 value_sz = sizeof(ub4);
		 mode = OCI_DEFAULT;
		 break;


-- 
Edit bug report at https://bugs.php.net/bug.php?id=68298&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=68298&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=68298&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=68298&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=68298&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=68298&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=68298&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=68298&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=68298&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=68298&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=68298&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=68298&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=68298&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=68298&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68298&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=68298&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=68298&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=68298&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68298&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=68298&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=68298&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#188283) next »