php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58487 -Werror=format-security
Submitted: 2009-01-04 06:54 UTC Modified: 2015-04-07 19:51 UTC
From: oden dot eriksson at envitory dot se Assigned:
Status: Suspended Package: colorer (PECL)
PHP Version: 5.2.5 OS: Linux
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
25 - 12 = ?
Subscribe to this entry?

 
 [2009-01-04 06:54 UTC] oden dot eriksson at envitory dot se
Description:
------------
The build fails with -Werror=format-security


Reproduce code:
---------------
/home/oden/RPM/BUILD/colorer-0.7/colorer.cpp:628: error: format not a string literal and no format arguments


Expected result:
----------------
It should build, and also preferably without all those compiler warnings.



Actual result:
--------------
Proposed fix:

--- colorer.cpp 2005-11-21 08:26:13.000000000 +0100
+++ colorer.cpp.oden    2009-01-04 12:46:43.000000000 +0100
@@ -625,7 +625,7 @@ static int colorer_do_highlight(INTERNAL
                        catch(Exception & e) {
                                php_error(E_WARNING, "can't open file '%s' for writing:\n",
                                                  outFile->getChars());
-                               php_error(E_WARNING, e.getMessage()->getChars());
+                               php_error(E_WARNING, "%s", e.getMessage()->getChars());
                                return FAILURE;
                        }
                }


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-07 19:51 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2015-04-07 19:51 UTC] cmb@php.net
Sorry, but apparently this package is not maintained anymore.
Marking this bug as "Suspended" for now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 11:01:30 2024 UTC