#32482 [Asn->Csd]: ap_php_snprintf broken
| From: | sniper@php.net | Date: | Fri, 08 Apr 2005 05:45:10 +0000 |
| Subject: | #32482 [Asn->Csd]: ap_php_snprintf broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76516@lists.php.net to get a copy of this message | ||
ID: 32482
Updated by: sniper@php.net
Reported By: neuhauser at sigpipe dot cz
-Status: Assigned
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: *
PHP Version: 4CVS-2005-03-29
Assigned To: helly
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-03-29 14:41:02] sniper@php.net
Marcus, can you MFH those fixes you have done in HEAD to snprintf.* ??
------------------------------------------------------------------------
[2005-03-29 14:10:26] neuhauser at sigpipe dot cz
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 this bug report at http://bugs.php.net/?id=32482&edit=1