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:
Miroslav Lichvar
2019-10-10 17:53:58 +02:00
parent 903fa247f8
commit 2fc8edacb8
4 changed files with 5 additions and 4 deletions

View File

@@ -266,7 +266,7 @@ LOG_FileWrite(LOG_FileID id, const char *format, ...)
return;
if (!logfiles[id].file) {
char filename[512], *logdir = CNF_GetLogDir();
char filename[PATH_MAX], *logdir = CNF_GetLogDir();
if (logdir[0] == '\0') {
LOG(LOGS_WARN, "logdir not specified");