Commit 16e0cae0 authored by Sergei Golubchik's avatar Sergei Golubchik

fixed a client-side overflow in mysql cli

parent 5f5f7bef
......@@ -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