Always NUL-terminate path in jsonlogger_init()
This commit is contained in:
parent
f689c4ec15
commit
a4e55f781b
|
@ -99,6 +99,7 @@ bool jsonlogger_init(const char *fifoname)
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(m_fifo_path, fifoname, sizeof(m_fifo_path));
|
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
|
m_fifo_fd = -1; // open on demand
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue