Commit feb3e390 authored by Sergei Golubchik's avatar Sergei Golubchik

fixed a client-side overflow in mysql cli

parent d809b4b8
......@@ -1171,7 +1171,7 @@ int main(int argc,char *argv[])
put_info("Welcome to the MariaDB monitor. Commands end with ; or \\g.",
INFO_INFO);
sprintf((char*) glob_buffer.ptr(),
my_snprintf((char*) glob_buffer.ptr(), glob_buffer.alloced_length(),
"Your %s connection id is %lu\nServer version: %s\n",
mysql_get_server_name(&mysql),
mysql_thread_id(&mysql), server_version_string(&mysql));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment