1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

BUG#4276 - socket path too long

This commit is contained in:
serg@serg.mylan
2004-06-26 19:37:48 +02:00
parent aed4e3f546
commit e3a713bf34

View File

@ -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 */