|  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: oden dot eriksson at envitory dot se
New email:
PHP Version: OS:


 [2009-01-04 06:54 UTC] oden dot eriksson at envitory dot se
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",
-                               php_error(E_WARNING, e.getMessage()->getChars());
+                               php_error(E_WARNING, "%s", e.getMessage()->getChars());
                                return FAILURE;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-07 19:51 UTC]
-Status: Open +Status: Suspended
 [2015-04-07 19:51 UTC]
Sorry, but apparently this package is not maintained anymore.
Marking this bug as "Suspended" for now.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Dec 07 09:01:27 2023 UTC