summaryrefslogtreecommitdiff
path: root/sql/sql_string.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r--sql/sql_string.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index a4050c579d0..483eb4fcbec 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -1204,6 +1204,8 @@ size_t convert_to_printable_required_length(uint len)
bool String::append_semi_hex(const char *s, uint len, CHARSET_INFO *cs)
{
+ if (!len)
+ return false;
size_t dst_len= convert_to_printable_required_length(len);
if (reserve(dst_len))
return true;