diff options
author | Georgi Kodinov <joro@sun.com> | 2010-05-05 11:54:52 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2010-05-05 11:54:52 +0300 |
commit | 1132c3547583fec41f2f7e0a8954c4da5bb1ca7e (patch) | |
tree | 3e5ae4df9250bbbafbe8258494b8f2b3e1cec431 /sql/item.h | |
parent | 0ca7c012acd7de6f418705afd06d53c20ee957f7 (diff) | |
download | mariadb-git-1132c3547583fec41f2f7e0a8954c4da5bb1ca7e.tar.gz |
On behalf of Kristofer :
Bug#53417 my_getwd() makes assumptions on the buffer sizes which not always hold true
The mysys library contains many functions for rewriting file paths. Most of these
functions makes implicit assumptions on the buffer sizes they write to. If a path is put
in my_realpath() it will propagate to my_getwd() which assumes that the buffer holding
the path name is greater than 2. This is not true in cases.
In the special case where a VARBIN_ITEM is passed as argument to the LOAD_FILE function
this can lead to a crash.
This patch fixes the issue by introduce more safe guards agaist buffer overruns.
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h index d2303853743..174995b43e6 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2123,7 +2123,7 @@ public: class Item_hex_string: public Item_basic_constant { public: - Item_hex_string() {} + Item_hex_string(); Item_hex_string(const char *str,uint str_length); enum Type type() const { return VARBIN_ITEM; } double val_real() @@ -2143,6 +2143,8 @@ public: bool eq(const Item *item, bool binary_cmp) const; virtual Item *safe_charset_converter(CHARSET_INFO *tocs); bool check_partition_func_processor(uchar *int_arg) {return FALSE;} +private: + void hex_string_init(const char *str, uint str_length); }; |