Commit e3a713bf authored by serg@serg.mylan's avatar serg@serg.mylan

BUG#4276 - socket path too long

parent aed4e3f5
......@@ -1246,6 +1246,12 @@ static void server_init(void)
{
DBUG_PRINT("general",("UNIX Socket is %s",mysqld_unix_port));
if (strlen(mysqld_unix_port) > (sizeof(UNIXaddr.sun_path) - 1))
{
sql_print_error("The socket file path is too long (> %d): %s",
sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
unireg_abort(1);
}
if ((unix_sock= socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
{
sql_perror("Can't start server : UNIX Socket "); /* purecov: inspected */
......
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