Skip to content

Commit

Permalink
Fix unitialized vars when sql.safe_mode=1
Browse files Browse the repository at this point in the history
which can break the subsequent mysqlnd_connect() call
  • Loading branch information
weltling committed May 15, 2013
1 parent ba1af29 commit 86db5fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/mysql/php_mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 86db5fb

Please sign in to comment.