summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2013-05-15 11:12:17 +0200
committerAnatol Belski <ab@php.net>2013-05-15 11:12:17 +0200
commit86db5fb4c2b7199dc862dfce99c345c49305ba8a (patch)
tree49e6f5455599ce1ed61b141ae911fec3b59f3daf
parentba1af298052cbef7329e330f2d3f9749b9be65bb (diff)
downloadphp-git-86db5fb4c2b7199dc862dfce99c345c49305ba8a.tar.gz
Fix unitialized vars when sql.safe_mode=1
which can break the subsequent mysqlnd_connect() call
-rw-r--r--ext/mysql/php_mysql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 51a060c897..c85e5235be 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -690,7 +690,7 @@ PHP_MINFO_FUNCTION(mysql)
static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
char *user=NULL, *passwd=NULL, *host_and_port=NULL, *socket=NULL, *tmp=NULL, *host=NULL;
- int user_len, passwd_len, host_len;
+ int user_len = 0, passwd_len = 0, host_len = 0;
char *hashed_details=NULL;
int hashed_details_length, port = MYSQL_PORT;
long client_flags = 0;