Bug #60948 [Asn]: mysqlnd FTBFS when -Wformat-security is enabled
| From: | johannes@php.net | Date: | Wed, 01 Feb 2012 13:37:25 +0000 |
| Subject: | Bug #60948 [Asn]: mysqlnd FTBFS when -Wformat-security is enabled | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167034@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60948&edit=1
ID: 60948
Updated by: johannes@php.net
Reported by: ondrej@php.net
Summary: mysqlnd FTBFS when -Wformat-security is enabled
Status: Assigned
Type: Bug
Package: MySQL related
Operating System: Any
PHP Version: 5.4.0RC6
Assigned To: mysql
Block user comment: N
Private report: N
New Comment:
As a remark: The patch is not strictly needed - the msg is a const char* without any risk of
injecting anything ... therefore not critical.
Previous Comments:
------------------------------------------------------------------------
[2012-02-01 13:34:47] johannes@php.net
Patch looks good, checking with RM before committing.
------------------------------------------------------------------------
[2012-02-01 13:10:40] ondrej@php.net
Description:
------------
$ svn diff
Index: ext/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- ext/mysqlnd/mysqlnd_wireprotocol.c (revision 322993)
+++ ext/mysqlnd/mysqlnd_wireprotocol.c (working copy)
@@ -500,7 +500,7 @@
const char * const msg = "Authentication data too long.
"
"Won't fit into the buffer and will be
truncated. Authentication will thus fail";
SET_CLIENT_ERROR(*conn->error_info, CR_UNKNOWN_ERROR,
UNKNOWN_SQLSTATE, msg);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, msg);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", msg);
DBG_RETURN(0);
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60948&edit=1