diff options
author | Andrey Hristov <andrey@php.net> | 2013-02-04 14:28:23 +0100 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2013-02-04 14:28:23 +0100 |
commit | c311884e5b7534f1a55c5bf95edb2add3bd04d0b (patch) | |
tree | f098720d89828337591c9baca58c5e806f07d2e5 /ext/mysqlnd | |
parent | cb8b2dd2e0257f13eedb0bf6ea07944dd71679ad (diff) | |
parent | 740b823be80a29e4c6537d4053eb7bad0fae6c41 (diff) | |
download | php-git-c311884e5b7534f1a55c5bf95edb2add3bd04d0b.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
Diffstat (limited to 'ext/mysqlnd')
-rw-r--r-- | ext/mysqlnd/mysqlnd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 96c420dee9..1bab6f5b7a 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -2329,7 +2329,14 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option)(MYSQLND_CONN_DATA * const c break; case MYSQL_SET_CHARSET_NAME: { - char * new_charset_name = mnd_pestrdup(value, conn->persistent); + char * new_charset_name; + if (!mysqlnd_find_charset_name(value)) { + SET_CLIENT_ERROR(*conn->error_info, CR_CANT_FIND_CHARSET, UNKNOWN_SQLSTATE, "Unknown character set"); + ret = FAIL; + break; + } + + new_charset_name = mnd_pestrdup(value, conn->persistent); if (!new_charset_name) { goto oom; } |