#32482 [Opn->Asn]: ap_php_snprintf broken

From: Date: Tue, 29 Mar 2005 12:41:03 +0000
Subject: #32482 [Opn->Asn]: ap_php_snprintf broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-75976@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: Open +Status: Assigned Bug Type: Scripting Engine problem -Operating System: FreeBSD-4, FreeBSD-5, RHEL3 +Operating System: * -PHP Version: 4.3.10 +PHP Version: 4CVS-2005-03-29 -Assigned To: +Assigned To: helly New Comment: Marcus, can you MFH those fixes you have done in HEAD to snprintf.* ?? Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#75976) next »