From:             oeriksson at mandriva dot com
Operating system: Mandriva Cooker
PHP version:      5.2.8
PHP Bug Type:     Compile Failure
Bug description:  -Werror=format-security

Description:
------------
I get a build error when using -Werror=format-security with
php_xmlwriter.c

Reproduce code:
---------------
Proposed fix:

[o...@oe BUILD]$ cat
php-5.2.8-format_not_a_string_literal_and_no_format_arguments.diff
--- ext/xmlwriter/php_xmlwriter.c       2008-12-16 17:31:11.000000000
+0100
+++ ext/xmlwriter/php_xmlwriter.c.oden  2008-12-16 17:31:54.000000000
+0100
@@ -168,7 +168,7 @@ static zend_object_value xmlwriter_objec

 #define XMLW_NAME_CHK(__err) \
        if (xmlValidateName((xmlChar *) name, 0) != 0) {        \
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, __err);     \
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", __err); 
     \
                RETURN_FALSE;   \
        }       \



Expected result:
----------------
It should build?

Actual result:
--------------
/home/oden/RPM/BUILD/php-5.2.8/ext/xmlwriter/php_xmlwriter.c: In function
'php_xmlwriter_string_arg':
/home/oden/RPM/BUILD/php-5.2.8/ext/xmlwriter/php_xmlwriter.c:441: error:
format not a string literal and no format arguments


-- 
Edit bug report at http://bugs.php.net/?id=46887&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46887&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46887&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46887&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46887&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46887&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46887&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46887&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46887&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46887&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46887&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46887&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46887&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46887&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46887&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46887&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46887&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46887&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46887&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46887&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46887&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46887&r=mysqlcfg

Reply via email to