php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35222 Possible integer rollover bug.
Submitted: 2005-11-15 07:46 UTC Modified: 2005-11-15 08:02 UTC
From: richard at is-pl dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.0.5 OS: Redhat Enterprise Linux 3
Private report: No CVE-ID: None
 [2005-11-15 07:46 UTC] richard at is-pl dot com
Description:
------------
When passing a specific value as an integer to a function a call to func_get_args reveals that the passed value has been corrupted somehow.

here is my configure command.

'./configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-ttf' '--with-gd' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr/lib' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-pcre=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-pear=/usr/share/pear' '--with-imap-ssl=/usr/local/imap-2002e' '--with-kerberos=/usr/kerberos' '--with-mysql=/usr' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2filter=/usr/sbin/apxs'

Reproduce code:
---------------
crctrntest(0502380732);

function crctrntest( $trn_key)
{
  print_r(func_get_args());
}

Expected result:
----------------
Array
(
    [0] => 502380732
)

Actual result:
--------------
Array
(
    [0] => 2579
)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-15 08:02 UTC] mike@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Number starting with 0 are interpreted as octal numbers.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Oct 12 10:00:01 2025 UTC