Bug #62273 [Ver->Csd]: Segmentation Fault in Mysqli/Mysqlnd
| From: | andrey@php.net | Date: | Fri, 29 Jun 2012 14:00:44 +0000 |
| Subject: | Bug #62273 [Ver->Csd]: Segmentation Fault in Mysqli/Mysqlnd | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-171627@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62273&edit=1
ID: 62273
Updated by: andrey@php.net
Reported by: andres at phalconphp dot com
Summary: Segmentation Fault in Mysqli/Mysqlnd
-Status: Verified
+Status: Closed
Type: Bug
Package: MySQLi related
Operating System: Linux/Mac
PHP Version: 5.3.15-dev/5.3.12/5.4.5-dev
Assigned To: mysql
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2012-06-29 14:00:29] andrey@php.net
The fix will come, together with more csets in the next PHP 5.3 release
------------------------------------------------------------------------
[2012-06-29 13:59:02] andrey@php.net
Automatic comment on behalf of andrey
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8fe87e7feaab2c031998d553585ba8cabf077499
Log: fix Bug #62273 Segmentation Fault in Mysqli/Mysqlnd
------------------------------------------------------------------------
[2012-06-12 08:09:40] andrey@php.net
php -r '$link = mysqli_connect("127.0.0.1", "root", "root",
"test");var_dump(mysqli_character_set_name($link));'
Segmentation fault (core dumped)
------------------------------------------------------------------------
[2012-06-11 23:45:50] andres at phalconphp dot com
hi, is someone assigned to this?
------------------------------------------------------------------------
[2012-06-09 05:56:58] andres at phalconphp dot com
I think the problem is the mysqlnd_charsets variable in ext/mysqlnd/mysqlnd_charset.c:
utf8_spanish_ci is returned as code 199 by the mysql/server but in the charset const is:
{ 119, UTF8_MB3, UTF8_MB3"_spanish_ci", 1, 3, "", mysqlnd_mbcharlen_utf8mb3,
check_mb_utf8mb3_valid},
Then mysqlnd_find_charset_nr is unable to find the charset name. And as a consequence of that,
conn->charset is null producing the segmentation fault.
I'm not sure what is the right solution for this, maybe updating the charset code or assigning
a default charset when the charset code does not match any.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=62273
--
Edit this bug report at https://bugs.php.net/bug.php?id=62273&edit=1