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
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: 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

Pull Requests

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: Sat Dec 21 14:01:32 2024 UTC