mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
BUG#4276 - socket path too long
This commit is contained in:
@@ -1246,6 +1246,12 @@ static void server_init(void)
|
|||||||
{
|
{
|
||||||
DBUG_PRINT("general",("UNIX Socket is %s",mysqld_unix_port));
|
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)
|
if ((unix_sock= socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
|
||||||
{
|
{
|
||||||
sql_perror("Can't start server : UNIX Socket "); /* purecov: inspected */
|
sql_perror("Can't start server : UNIX Socket "); /* purecov: inspected */
|
||||||
|
Reference in New Issue
Block a user