#32482 [NEW]: ap_php_snprintf broken
| From: | neuhauser at sigpipe dot cz | Date: | Tue, 29 Mar 2005 12:10:27 +0000 |
| Subject: | #32482 [NEW]: ap_php_snprintf broken | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-76741@lists.php.net to get a copy of this message | ||
From: neuhauser at sigpipe dot cz
Operating system: FreeBSD-4, FreeBSD-5, RHEL3
PHP version: 4.3.10
PHP Bug Type: Scripting Engine problem
Bug description: ap_php_snprintf broken
Description:
------------
ap_php_snprintf, which is used unconditionally in 4.3.10, doesn't handle
%lld. please revert the change or fix ap_php_snprintf.
Reproduce code:
---------------
this works:
int
main (int argc, char **argv)
{
char tmp[256];
int tmp_len = snprintf((char *)&tmp, sizeof(tmp) - 1, "%lld",
127LL);
printf("strlen (%s) == %d\n", tmp, tmp_len);
return 0;
}
replace the snprintf with ap_php_snprintf, and you'll get
"%ld" instead of "127".
--
Edit bug report at http://bugs.php.net/?id=32482&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32482&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32482&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32482&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32482&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32482&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32482&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32482&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32482&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32482&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32482&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32482&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32482&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32482&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32482&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32482&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32482&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32482&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32482&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32482&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32482&r=mysqlcfg