mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-26 17:00:32 +01:00
logging: fix stack overflow in logging for iov_data array
This overflow could only happen when we would try to log a message with "NM_DEVICE=", "NM_CONNECTION=", and more than 8 logging domains (_NUM_MAX_FIELDS_SYSLOG_FACILITY - 2). The latter is never the case. While we sometimes log messages with more than one logging domain, there are no logging statements that use most as 8 different logging domains. So, this overflow is not actually reachable from current code (I think). Fixes:ed552c732c('logging: log device and connection along with the message'): (cherry picked from commit138c187376)
This commit is contained in:
parent
3309af1a2e
commit
034a1011e9
1 changed files with 1 additions and 1 deletions
|
|
@ -738,7 +738,7 @@ _nm_log_impl (const char *file,
|
|||
{
|
||||
gint64 now, boottime;
|
||||
#define _NUM_MAX_FIELDS_SYSLOG_FACILITY 10
|
||||
struct iovec iov_data[12 + _NUM_MAX_FIELDS_SYSLOG_FACILITY];
|
||||
struct iovec iov_data[14 + _NUM_MAX_FIELDS_SYSLOG_FACILITY];
|
||||
struct iovec *iov = iov_data;
|
||||
gpointer iov_free_data[5];
|
||||
gpointer *iov_free = iov_free_data;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue