php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46999 -Werror=format-security
Submitted: 2009-01-04 12:12 UTC Modified: 2009-01-07 14:42 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: oden dot eriksson at envitory dot se Assigned: bmajdak (profile)
Status: Closed Package: PHP-GTK related
PHP Version: 5.2.8 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:

 

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

Will attach a patch that fixes this.

Expected result:
----------------
It should build.

Actual result:
--------------
/home/oden/RPM/BUILD/php-gtk-2.0.1/main/php_gtk_util.c: In function 'parse_arg':
/home/oden/RPM/BUILD/php-gtk-2.0.1/main/php_gtk_util.c:422: error: format not a string literal and no format arguments
/home/oden/RPM/BUILD/php-gtk-2.0.1/main/php_gtk_util.c: In function 'parse_va_args':
/home/oden/RPM/BUILD/php-gtk-2.0.1/main/php_gtk_util.c:482: error: format not a string literal and no format arguments


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-04 12:13 UTC] oden dot eriksson at envitory dot se
--- main/php_gtk_util.c 2008-03-12 16:46:45.000000000 +0100
+++ main/php_gtk_util.c.oden    2009-01-04 13:03:11.000000000 +0100
@@ -419,7 +419,7 @@ static int parse_arg(int arg_num, zval *
                                        get_active_class_name(NULL TSRMLS_CC),
                                        get_active_function_name(TSRMLS_C), arg_num, expected_type,
                                        php_gtk_zval_type_name(*arg));
-                       php_error(E_WARNING, buf);
+                       php_error(E_WARNING, "%s", buf);
                }
                return 0;
        }
@@ -479,7 +479,7 @@ static int parse_va_args(int argc, zval
                                        argc < min_argc ? min_argc : max_argc,
                                        (argc < min_argc ? min_argc : max_argc) == 1 ? "" : "s",
                                        argc);
-                       php_error(E_WARNING, buf);
+                       php_error(E_WARNING, "%s", buf);
                }
                return 0;
        }
 [2009-01-07 14:42 UTC] bmajdak@php.net
patch applied, thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC