Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
OS: Windows 8 Professional 64-bit
Locale: Japanese_Japan.932
Faulting C run-time library function: _vsnprintf
Description
In source file my_init.c, there is a call
setlocale(LC_CTYPE, ""); /* To get right sortorder */
This will eventually set the locale to system locale. C run-time functions uses this information for validating/comparing parameters. In my understanding this is dangerous thing to do for a UTF-8 client. As UTF-8 doesnt depend on any locale, the passed string might have some character sequence that the string functions consider improper. This is resulting in exception.
I checked the mariadbclient source and couldn't find any relevent functions which uses strcmp and depends on locale. So I think it is not doing anything the comment says, correct me if I am wrong.
On a side note I believe MariaDB client shouldn't have set the locale on the whole, it should have rather used the locale enabled versions of string functions for its internal use.
Fixed in rev. 79