diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2010-10-12 23:28:03 +0400 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2010-10-12 23:28:03 +0400 |
commit | b001a5224d8b26e9706a386ca2c26320d152ee1c (patch) | |
tree | 8ee82f26a8f91494a4c04a53b72706df84252c80 /sql/item_strfunc.cc | |
parent | 42550e21e85904877714a3215a220e471597c3e2 (diff) | |
download | mariadb-git-b001a5224d8b26e9706a386ca2c26320d152ee1c.tar.gz |
Fix for bug#57283: inet_ntoa() crashes
Problem: some call of INET_NTOA() function may lead
to a crash due to missing its character set initialization.
Fix: explicitly set the character set.
mysql-test/r/func_misc.result:
Fix for bug#57283: inet_ntoa() crashes
- test result.
mysql-test/t/func_misc.test:
Fix for bug#57283: inet_ntoa() crashes
- test case.
sql/item_strfunc.cc:
Fix for bug#57283: inet_ntoa() crashes
- explicitly set buffer's character set.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 9f06a4b5c9f..8fda281bd9e 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -3135,6 +3135,7 @@ String* Item_func_inet_ntoa::val_str(String* str) if ((null_value= (args[0]->null_value || n > (ulonglong) LL(4294967295)))) return 0; // Null value + str->set_charset(collation.collation); str->length(0); int4store(buf,n); |