Bug #66594 [Opn->Csd]: Please use -Wformat=security when compiling and testing releases

From: Date: Tue, 28 Jan 2014 17:24:18 +0000
Subject: Bug #66594 [Opn->Csd]: Please use -Wformat=security when compiling and testing releases
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184055@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66594&edit=1

 ID:                 66594
 Updated by:         krakjoe@php.net
 Reported by:        ondrej@php.net
 Summary:            Please use -Wformat=security when compiling and
                     testing releases
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            phpdbg
 Operating System:   Any
 PHP Version:        5.6.0alpha1
-Assigned To:        
+Assigned To:        krakjoe
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2014-01-28 11:21:08] 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;
 				}
 			}




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=66594&edit=1


Thread (2 messages)

« previous php.bugs (#184055) next »