Bug #3027: error_log interpets % as printf formats and chrashes

From: Date: Wed, 22 Dec 1999 19:49:30 +0000
Subject: Bug #3027: error_log interpets % as printf formats and chrashes
Groups: php.dev php.dev 
Request: Send a blank email to php-dev+get-13945@lists.php.net to get a copy of this message
From: zot@zotconsulting.com Operating system: Linux, FreeBSD PHP version: 3.0.12 PHP Bug Type: Reproduceable crash Bug description: error_log interpets % as printf formats and chrashes error_log("'%eagle'"); produces in the apache error_log: [Wed Dec 22 11:28:26 1999] [error] '5.318473e-315agle' other printf strings. In a sql statement of length it crashes repeatedly on any query that has a %e %f %g %h %n My guess is error_log is taking from the next set of arguments, the values for %. Thus it is causing a buffer overflow from time to time. though error_log("'%etttt'"); shows the same scientific number as eagle. I have tested this under Redhat 6.0, Apache/1.3.9, PHP 3.0.12. FreeBSd with Apache/1.3.3, PHP 3.0.6, and Redhat 5.1, Red Hat Secure/2.0, PHP3.0.8. a '%%' prints % just fine. I have added a note to the error_log page.

« previous php.dev (#13945) next »