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 | bc84be595693ea59f1cd8652d0e1286599955c90 (patch) | |
tree | 8ee82f26a8f91494a4c04a53b72706df84252c80 /sql | |
parent | b6346b44362ae2a239855e03400a16ea53a31cf0 (diff) | |
download | mariadb-git-bc84be595693ea59f1cd8652d0e1286599955c90.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')
-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); |