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
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: ondrej@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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 Dec 12 17:01:31 2024 UTC