php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66594 Please use -Wformat=security when compiling and testing releases
Submitted: 2014-01-28 11:21 UTC Modified: 2014-01-28 17:24 UTC
From: ondrej@php.net Assigned: krakjoe (profile)
Status: Closed Package: phpdbg
PHP Version: 5.6.0alpha1 OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 + 1 = ?
Subscribe to this entry?

 
 [2014-01-28 11:21 UTC] ondrej@php.net
Description:
------------
/tmp/buildd/php5-5.6.0~alpha1+dfsg/sapi/phpdbg/phpdbg_cmd.c:482:5: error: format not a string literal and no format arguments [-Werror=format-security]

A very short patch:

--- php5.orig/sapi/phpdbg/phpdbg_cmd.c
+++ php5/sapi/phpdbg/phpdbg_cmd.c
@@ -479,7 +479,7 @@ disconnect:
 
 #ifndef HAVE_LIBREADLINE
 			if (!(PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) {
-				if (!phpdbg_write(phpdbg_get_prompt(TSRMLS_C))) {
+				if (!phpdbg_write("%s", phpdbg_get_prompt(TSRMLS_C))) {
 					goto disconnect;
 				}
 			}



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-28 17:24 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2014-01-28 17:24 UTC] krakjoe@php.net
The fix for this bug has been committed.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Thanks, fixed in phpdbg master, which will be merged into php-src tree before next alpha release.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC