diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-08-09 18:25:47 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-08-09 18:25:47 +0200 |
commit | 7cc2f8decabe83fb304458748ba907f011848309 (patch) | |
tree | ec02a2a082252b3c88ada39e48e90c6316ae8144 /sql/item_geofunc.cc | |
parent | d11829654c4ef5c3d0f997ca61a50d4bd196db8a (diff) | |
download | mariadb-git-7cc2f8decabe83fb304458748ba907f011848309.tar.gz |
fix val_str_ascii to return a string in the ascii-compatible charset.
two items didn't do that properly, one was exploitable, the other was not, but fixed anyway.
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r-- | sql/item_geofunc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index fdd3cab8273..3648b10af3f 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -135,6 +135,7 @@ String *Item_func_as_wkt::val_str_ascii(String *str) return 0; str->length(0); + str->set_charset(&my_charset_latin1); if ((null_value= geom->as_wkt(str, &dummy))) return 0; @@ -182,7 +183,7 @@ String *Item_func_geometry_type::val_str_ascii(String *str) /* String will not move */ str->copy(geom->get_class_info()->m_name.str, geom->get_class_info()->m_name.length, - default_charset()); + &my_charset_latin1); return str; } |