Bug #61536 [Opn->Csd]: when building with hardening-wrapper, mysqlnd fails with format exceptions
| From: | uw@php.net | Date: | Fri, 04 May 2012 09:46:33 +0000 |
| Subject: | Bug #61536 [Opn->Csd]: when building with hardening-wrapper, mysqlnd fails with format exceptions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-170163@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61536&edit=1
ID: 61536
Updated by: uw@php.net
Reported by: i dot galic at brainsware dot org
Summary: when building with hardening-wrapper, mysqlnd fails
with format exceptions
-Status: Open
+Status: Closed
Type: Bug
Package: MySQL related
Operating System: Ubuntu
PHP Version: 5.4.0
-Assigned To:
+Assigned To: uw
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Duplicate of https://bugs.php.net/bug.php?id=60948 :
[2012-02-01 13:10 UTC] 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);
}
Previous Comments:
------------------------------------------------------------------------
[2012-05-02 14:52:31] uw@php.net
Funny compiler...
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, "%s", msg);
DBG_RETURN(0);
------------------------------------------------------------------------
[2012-03-28 00:19:22] i dot galic at brainsware dot org
Description:
------------
when building with hardening-wrapper, mysqlnd fails with format exceptions
Test script:
---------------
add CFLAGS="$CFLAGS -Werror=format-security"
Expected result:
----------------
Everything builds happily.
Actual result:
--------------
php-5.4.0/ext/mysqlnd/mysqlnd_wireprotocol.c: In function âphp_mysqlnd_auth_writeâ:
php-5.4.0/ext/mysqlnd/mysqlnd_wireprotocol.c:503:4: error: format not a string literal and no format
arguments [-Werror=format-security]
cc1: some warnings being treated as errors
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61536&edit=1