mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 02:15:07 -05:00
use PATH_MAX
Include <limits.h> and use the PATH_MAX macro to define the length of buffers containing paths to make it constistent. (It's not supposed to fit all possible paths.)
This commit is contained in:
@@ -129,7 +129,7 @@ close_socket(void)
|
||||
static int
|
||||
open_socket(void)
|
||||
{
|
||||
char path[1024];
|
||||
char path[PATH_MAX];
|
||||
|
||||
if (sock_fd != INVALID_SOCK_FD)
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user