php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32482 ap_php_snprintf broken
Submitted: 2005-03-29 14:10 UTC Modified: 2005-04-08 07:45 UTC
From: neuhauser at sigpipe dot cz Assigned: helly (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 4CVS-2005-03-29 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: neuhauser at sigpipe dot cz
New email:
PHP Version: OS:

 

 [2005-03-29 14:10 UTC] 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".


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-29 14:41 UTC] sniper@php.net
Marcus, can you MFH those fixes you have done in HEAD to snprintf.* ??

 [2005-04-08 07:45 UTC] sniper@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 14:01:28 2024 UTC