From 8fe87e7feaab2c031998d553585ba8cabf077499 Mon Sep 17 00:00:00 2001 From: andrey Date: Fri, 29 Jun 2012 14:42:36 +0300 Subject: fix Bug #62273 Segmentation Fault in Mysqli/Mysqlnd --- ext/mysqlnd/mysqlnd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index cc2dd06c31..b539c5180c 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -680,6 +680,13 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND * conn, conn->server_version = mnd_pestrdup(greet_packet->server_version, conn->persistent); conn->greet_charset = mysqlnd_find_charset_nr(greet_packet->charset_no); + if (!conn->greet_charset) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, + "Server sent charset (%d) unknown to the client. Please, report to the developers", greet_packet->charset_no); + SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, + "Server sent charset unknown to the client. Please, report to the developers"); + goto err; + } /* we allow load data local infile by default */ mysql_flags |= CLIENT_LOCAL_FILES | CLIENT_PS_MULTI_RESULTS; mysql_flags |= MYSQLND_CAPABILITIES; -- cgit v1.2.1 From ed1f058591778103ea852324ad6cd847a10b2911 Mon Sep 17 00:00:00 2001 From: andrey Date: Fri, 29 Jun 2012 16:32:55 +0300 Subject: merge --- ext/mysqlnd/mysqlnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 81ecd33d0b..4a63681fb7 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -767,7 +767,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn, if (!conn->greet_charset) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Server sent charset (%d) unknown to the client. Please, report to the developers", greet_packet->charset_no); - SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, + SET_CLIENT_ERROR(*conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "Server sent charset unknown to the client. Please, report to the developers"); goto err; } -- cgit v1.2.1 From 75d8af715cd624dda243d31f826c7da927ccd22f Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 30 Jun 2012 16:29:30 -0300 Subject: - Fixed bug #62415 (Undefined variable: diff in run-tests.php on line 2093 for successful XFAIL) --- run-tests.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run-tests.php b/run-tests.php index 9a01f56c97..2a4698639f 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2089,8 +2089,10 @@ $output if (isset($old_php)) { $php = $old_php; } + + $diff = empty($diff) ? '' : "', $diff) . "\n]]>"; - junit_mark_test_as($restype, str_replace($cwd . '/', '', $tested_file), $tested, null, $info, "', $diff) . "\n]]>"); + junit_mark_test_as($restype, str_replace($cwd . '/', '', $tested_file), $tested, null, $info, $diff); return $restype[0] . 'ED'; } -- cgit v1.2.1