php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58486 -Werror=format-security
Submitted: 2009-01-04 06:40 UTC Modified: 2012-07-29 18:46 UTC
From: oden dot eriksson at envitory dot se Assigned: francois (profile)
Status: Closed Package: automap (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:
Package:
Bug Type:
Summary:
From: oden dot eriksson at envitory dot se
New email:
PHP Version: OS:

Further comment on this bug is unnecessary.

 

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

Reproduce code:
---------------
/home/oden/RPM/BUILD/automap-1.1.0/Automap.c:1411: error: format not a string literal and no format arguments
/home/oden/RPM/BUILD/automap-1.1.0/Automap.c:1413: 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:

--- Automap.c   2008-01-19 04:07:09.000000000 +0100
+++ Automap.c.oden      2009-01-04 12:24:31.000000000 +0100
@@ -1408,9 +1408,9 @@ cellpadding=3 cellspacing=0 style=\"bord
                                        ,1,&zp TSRMLS_CC);
                                if (ZVAL_IS_STRING(&zret)) {
                                        php_printf("<a href=\"%s\">%s</a>",Z_STRVAL(zret),fname);
-                               } else php_printf(fname);
+                               } else php_printf("%s", fname);
                                zval_dtor(&zret);
-                       } else php_printf(fname);
+                       } else php_printf("%s", fname);

                        php_printf("</td></tr>\n");



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-29 16:51 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: francois
 [2012-07-29 18:46 UTC] francois@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Fixed in automap PECL extension version 2.0.0
 [2012-07-29 18:46 UTC] francois@php.net
-Status: Assigned +Status: Closed -Block user comment: No +Block user comment: Yes
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 23:01:30 2024 UTC