Always NUL-terminate path in jsonlogger_init()

This commit is contained in:
Simon Ruderich 2024-05-09 18:32:26 +02:00
parent f689c4ec15
commit a4e55f781b
1 changed files with 1 additions and 0 deletions

View File

@ -99,6 +99,7 @@ bool jsonlogger_init(const char *fifoname)
}
strncpy(m_fifo_path, fifoname, sizeof(m_fifo_path));
m_fifo_path[sizeof(m_fifo_path)-1] = '\0';
m_fifo_fd = -1; // open on demand